Using JGrasp with Java and C Interchangabley - jgrasp

I use the JGrasp when programming in Java for AP Computer Science for school, but then for a project outside of school I need to be able to also code and create programs in C. Would I have to go into Workspace and change the default language every time I want to switch between which language I'm writing in? I have both JDK and a C language compiler downloaded onto my computer.

The language setting at the workspace (or project) settings level does not change anything except the language for which settings are shown. That is, it affects only the settings dialog and not anything else. Only the file level language setting matters (it determines the language for the corresponding file). Whatever is the the language for the file in focus, that language will be used. You can have Java and C files/projects open at the same time and there will be no conflicts.

Related

What determine the language of the Model in a SSAS Tabular solution?

I have 2 tabulars projects, but the language of the model are differents
(My first one is in English (United State), my second project is in French)
I am confused, i don't know why i have two project with different language, my system, my Visual Studio and even my instances SQL Server are in english.
First Project :
Second Project :
I also try to modify the language directly by clicking "View Code" (But he doesn't recognize my modification and he won't let me build the project after the modification).
I have been looking for a solution of this problem as well. In fact you have already been close to it.
Open your model in the code view
Change the culture to a value appropriate to the default culture, which usually is "en-US"
Save and close the solution
Open the project folder in Windows Explorer
Delete or rename the folders bin and obj
Open your solution again
Now you are able to Rebuild
You have to process the whole database again to get the data
You better change the culture at the very beginning of a new project, then you don't have to delete both folders.
However, it is a shame for an international company like Microsoft that there are still such ugly issues with localization in professional development tools.

Template engine/pre-processor that works from *within* the target language

I'm using Eclipse as my IDE, and I now have looked at about a dozen template engines, and they all seem to work in a similar way:
You create a template file in the template language
The IDE plugin, if any, recognize the template syntax, rather then the target language syntax.
The generated/modified file, in the target language, is read-only, since it will get replaced on next generation.
This greatly limits the use of template engines/pre-processor, because you loose the IDE support for the target language.
Generally, the templating syntax will be simple enough anyway, that you could easily get by without IDE support for it. What is really needed, is to get the target language support from within the template.
In other words, is there some pre-processor/template engine, that does not require you to create "template files", but rather register itself in the IDE between the file system and the target language support, modifying the content of the file on the fly such that the target language plugin sees the file after generation, while the file is saved in the file system as it was before the generation, that is, it contains the template on the file system, rather then the generated code.
In other other words, I want to write the templates in the target language, and have them recognized as such by the IDE editor, such that the editor sees the code after generation (maybe hide the template instructions in comments?).
Such a plugin would then be totally generic, and independent of the actual file type containing the template (as long as it's a text file). All that would be needed, is then some configuration file telling the template engine in which files/directories to look for templates.
Alternatively, if no such product exist, does it seem like something that could be implemented in Eclipse as a plugin, or is it more a case that there are no such plugin because it would be basically impossible?
Here a list of a few things I've looked at, all of which don't seem to support the desired use case:
Xtend
eclipseME - Preprocessing
Java Comment Preprocessor
Preprocessing Java with Munge Munge
Velocity
Jamon
JET
StringTemplate
Xpand
Freemarker
Mustache Java
Jade4J
Closure Templates in Java
Rythm Engine
Related question: Saving self-written code - xtend

Domain specific language IDE

I've recently developed a domain-specific language using flex and bison. I would like to create a user interface for editing script files using this language. In particular I would like to have common functionalities such as file handling, menus, buttons, syntax highlighting, error checking and so on. Do you know any tool which can be used to develop such kind of application? I would prefer one which can give me a prototype rapidly.
such as file handling, menus, buttons, syntax highlighting, error
checking
I think that file handling, menus, buttons and highlighting are your least concerns. What you call "error checking" on the other hand. That can be a tough nut. I will try to give you some pointers to how you can (in a somewhat primitive manner) detect errors on the fly as the user inputs source code in the editor.
I assume you wish for something like Eclipses (for java at least) real time analysis of the written code in the editor? I'm not familiar with how Eclipse work internally but this is probably done by some pre-compilation process that processes all source code again and again as you change it.
One way to prototype this (and indeed build a non-prototype as well) would be to use Flex and Bison, and I notice you already is familiar with these tools. You can build you grammar and create action code for all interesting parts so you can find syntax deviations fairly easy. After this you make your editor run the flex and bison generated c-code as the user writes the source code in you IDE and have some way of displaying the output. Either in a terminal-like status window or directly in the text-editing field (as Eclipse does) (the latter case is probably a pain to build but by no means impossible and would give you IDE a professional touch).
Suppose you would like to build an IDE for ADA 95 the following Flex and Bison (Actually Lex and Yacc) code could help you do exactly this (it's a decent syntax analyzer that reports errors (what and where)):
http://www.adaic.org/resources/add_content/standards/95lrm/lexer9x.l
http://www.adaic.org/resources/add_content/standards/95lrm/grammar9x.y
Hope this helps.
Edit:
to have cool error highlighting and such in the text-editor field of your IDE you could let your bison generated syntax analyser generate something thats easy to parse, like XML, that contains the type of error and where it lies (row and column for example) and then use that to display the errors... you simply embed an XML parser in the IDE (lots of free one available) and extract the data you need and change the display accordingly... That shouldn't be rocket science when I think about it.

How to use get all NSLocalization using genstrings while preserved current translations

Let say my iOS app already have translation localizatible.strings for Japanese. Say "Continue" = "続ける";
However, I've added new NSLocalization additions to my code but I want to use genstrings to get all new NSLocalizations without having to merge them manually.
Is there any way to do that?
There are tools that manage localization and that automatically make updates to translations based on changes to the base language (and helping the translator make the necessary changes only to whatever has been changed).
For example www.gengo.com has a free online tool called Strings (which I haven't tried yet). There are also desktop apps that look very good, such as Localization Manager as part of Localization Suite http://www.loc-suite.org/ (which I haven't tried properly yet either).
Localization agencies may have their own tools, too.
These tools are a must if you do a lot of updates and have several languages but for smaller projects, they can take a bit too much getting used to. For an occasional task or a small project with few languages, manually merging the changes of your base language localizable.strings files to your translated localizable.strings files might be quicker though.

Xcode: Run project with specified localization

My Cocoa project is localized in Italian (my language) and English language.
If I run it, i see everything in Italian (of course, my OS is italian!).
How can I run it to test the English localization without changing the OS language?
In the old times, Leopard and before, the get info window in Finder would let
you choose the available languages. So it was a matter of deselecting the
language that you don't want to use and it would "default" to the other.
These days you can use an utility like this one. I'd love to know what it
does behind the scenes though.
I finally found a nice solution in the cocoa-dev mailing list archives.
Apparently, you can change the default domain within the arguments passed to
your executable, and this causes the global preference to be overwritten. It
can be achieved with the -AppleLanguages flag, pass a list of the languages
in the preferred order:
~/apath/AppName.app/Contents/MacOS/AppName -AppleLanguages "(Italian, English)"
Run this from your terminal and it should give a different precedence for the
language. Notice you can also specify a single element list "(Italian)"
—makes more sense for testing purposes.
To do it within Xcode and avoid the terminal, go to the menu Product > Edit
Scheme… . Then, in your run configuration switch to the Arguments tab and
create a new one to be passed on launch. Add -AppleLanguages "(Japanese)"
text to it. Something similar to this:
Assuming you have a file that holds all the strings, swap the names of the files. Or, if you've got a it.lproj and en.lproj group in your project, just move your InfoPlist.strings (or whatever you named it) into the other group and vice versa.