Create plug-in that creates a snapshot of the source code currently opened on editor - Eclipse CDT - eclipse

I need to create a plug-in for Eclipse CDT that sends a "snapshot" of the source code of the currently opened editor each time the code is "built".
I am already capable of doing it each time the user presses a custom button created by me, but it would be great if it could be done when the "standard" "build" action is performed.
Do i need no create a plug-in of the type "builder"?
I am using Eclipse 4.4.0...
Can someone help me?! (Sorry for some english mistakes... :( )

One solution would be to create your own custom "Builder". Instead of actually building the code, it would invoke the functionality you already have.
For information on how to use the eclipse build system, please have a look here: https://wiki.eclipse.org/Eclipse/FAQ/How_do_I_implement_an_Eclipse_builder%3F.
Also, this website goes into more details about building in eclipse: https://www.eclipse.org/articles/Article-Builders/builders.htm. However, I think that the first one should do.
As a side note, this works with any kind of eclipse project (JDT and CDT). The build described there is common to all flavours.
Hope it helps,
-Caius

Related

How to understand the code flow in nuxeo

Recently I have downloaded the Nuxeo code, SDK and Nuxio IDE for the development purpose. I am also able to do build the project run the SDK and importing project into eclipse. But as Nuxeo guys know, it's a huge project and document doesn't contains details about the Code Flow. So, I am sucked. To develop and fix bugs I need to know the existing code structure, functionality of each projects(modules/bundles) , how to identify the code flow if user click on a button. So, please help me
It depends on the UI you want to debug. If it's the JSF UI, then the buttons are usually associated with an "action" contributed from an XML file. You can then follow the thread.
Your question is too much generic to give you more details. Do look for development guidelines and/or how-to fix some bugs? In the latter case, it depends on each kind of bug, the Nuxeo version, the original code writer (Nuxeo legacy code or customized code), the use of Nuxeo Studio or not...

Mapping between resource file and model object in Eclipse plugin app

Please anyone help me understand and use IDE.openEditor(IWorkbenchPage, IFile).
I have a resource file (xml format), it contains my model objects. I'm writing a wizard to create it, save it into workspace, view it inside a tree view (I use CommonNavigator) and open it in an editor. I need to know the control flow of this all. How to map between resource file and model objects, how the navigator can show that objects and how to open editor that associated with my resource file.
I'm sorry, I'm a newbie in Eclipse field. I know I need too much, but please give me at least an idea.
Thanks a lot.
A great character once said... "You have much to learn young padawan".
Here's a great place to start your journey though the basics of Eclipse plug-in / RCP development...
http://www.vogella.com/eclipse.html
If you really want to get down and dirty into the bowels of Eclipse, you can use Eclipse itself to teach you the dirty details about what's really going on.
Figure out how to view Eclipse source code inside of Eclipse.
Set break points at interesting points in Eclipse source code that you want to know more about.
Use the 'Eclipse Application' run configuration to run an instance of Eclipse from within your main Eclipse.
Use your newly launched Eclipse to preform the tasks you want to mimic and hopefully, you'll hit one of your break points and see how the Eclipse developers did what you want to do.

Eclipse - New Project

I need to modify project creation in eclipse. I would like to add my own project creation. For example, when developer selectes File->New->Project, I want my option (i.e, XYZ Java Project) under to be available. Is this possible ? If yes, i am looking for some direction to begin with ?
Thanks.
To begin with you need to contribute your own Eclipse Plug in. Download Eclipse plugin developers IDE from this Location.
You can contribute a Custom Project Wizard through Extensions.
Define your Project Nature
For reference you can check this example Create a Custom Project in Eclipse – New Project Wizard: the Behavior
Hope this helps !!
Yes you can. A robust way to do this is to make an eclipse plugin so that it gets added to the menu. I was just looking into this myself a couple of days ago and this is what I found.
Here are some links:
O'Reilly
Better yet though, let me just show you an answer about this: https://stackoverflow.com/a/299316/879485
If you use Maven you can have a look at archetypes. Maven also has the ability to create Eclipse projects. With this you should have all the tools necessary to automate whatever project layout you need to have.

To modify a core eclipse plugin

In order to modify an eclipse plugin, what are the steps to find its editable code ?
I read and debug source provided with eclipse distribution but to try a fix in org.eclipse.jdt.internal.corext.codemanipulation behavior I need to make it editable.
Well, the source repository is available at eclipse.org, the plugin compiled with the source should be available from the standard eclipse update site.
I'm guessing you are considering changing the source, recompiling and using your plugin instead of the standard one? There is a different way to change functionality, its with fragments. For example, look at a question I asked earlier, follow the links in my text and Andrews answer for more information.

Eclipse/Zend Studio, stop validation for parts of a project tree

I have some external libraries that are showing 'warnings', I want to stop validation of this part of my project because it is interfering with actual warning messages from my source code. Is this possible?
I am using Zend Studio but it is based on eclipse so I think the same method will apply on both applications.
You can try to go to Preferences/Validation/HTML syntax validator for PHP files/ click on settings. Add first an exclude group and then add a rule with your library folder. This will work at least with pure PHP warnings. I have a similar question concerning DLTK warnings and also posted this question to ZS forums, but I have not too much hope from there.
I was having the same issue with a dependency we were pulling in and the previous answer didn't help (maybe because it changed in the last 7 years). I found a solution on the Zend Forums.
Word of caution: if your files are having errors, you probably should NOT preform these steps!
To summarize:
Right-click on the folder.
Click "User As Library Folder"