eclipse add own Project Configuration UI Elements - eclipse

Hy i wrote a eclipse plugin that generates some stuff for cdt using xtext.
Now i would like to add a Configuration UI to the Projects.
Can some one tellme where i find a example of how to extend the Project Property Window?

Related

AEM WKND tutorial component basics eclipse not recognizing jcr properties

I am doing the WKND tutorial and in the component basics section https://docs.adobe.com/content/help/en/experience-manager-learn/getting-started-wknd-tutorial-develop/component-basics.html
the tutorial jumps into loading the project in eclipse and it seems that they have all the tools in place. I imported the project as an maven project and have the aem tools built in but I do not see the create node option when I try to create something under ui.app
I cannot see any jce properties populate anywhere
You should enable the Content Module option inside Project Faces as follow:
Then restart the IDE and you'll be available to create a new Node.

Exporting an GEF-Editor as a runnable JAR

As stated in the title: I want to run an Eclipse-Plugin, more specifically a GEF-Editor, without starting an Eclipse instance before.
I've tried to use the export functionality provided in the MANIFEST.MF file:
However, running the generated JAR (call it editor.jar) by executing java -jar editor.jar on the command line fails with the message no main manifest attribute, in plugins editor.jar.
I'm aware of the fact, that this is because my MANIFEST.MF file is missing the following line
Main-Class: <packagename>.<classname>
which defines an entry point for my application. However, I've no idea what exactly I need to do here (in the case of an Eclipse-Plugin), cause I don't have something like a main method. I assume Eclipse is running some magic code it doesn't show to me, when I start my project as an Eclipse Application.
So, what do I need to do?
You could try running a GEF editor as a Java application. See Draw2D examples to understand how it can be done. You could probably re-use your GraphicalViewer and PaletteViewer, which means that mouse based interactions with the diagram and palette will be preserved.
However, your editor class would probably have to be incorporated into an SWT shell. Also, all actions contributed to by your editor into Eclipse toolbars, popup menus etc. would be gone. Outline and Tree view would have to be incorporated into your java app somehow if needed.
Think you'd be better off with an RCP application.
Wrap your GEF editor in a simple RCP. You can create one via the Plug-in wizard, setting "Would you create a rich client application?" to "Yes" in the process. This gives you the option to create a minimal application via the Hello World template in the next step. Once you have this, you can either embed your GEF editor in this plugin, or declare a dependency from the new RCP application to your GEF editor plugin, and start the editor from the Application class' start method.
For an overview of resources about RCP development, cf. Getting started with the Eclipse RCP.
It really doesn't add that much overhead to your editor but gives you the opportunity to work with the platform's workbench and workspace metaphors and create easy-to-deploy-and-use application bundles.
Once you have that in place, you can test your RCP from plugin.xml > Overview > Testing > Launch an Eclipse application. This will not run a whole new instance of the IDE, but just the RCP application itself.
Rather than exporting from the MANIFEST.MF, look into creating a product (you can do it via the wizard: New > Product Configuration), and building it via the Maven Tycho plugin(s) (have a look at the respective - really worthwhile - tutorial from EclipseCon Europe 2012: http://eclipsecon.org/europe2012/sessions/building-eclipse-plugins-and-rcp-applications-tycho.html, this includes a section on creating a product as well). Tycho gives true cross-platform builds, as long as you're not on Windows.
No magic code there :).

Eclipse RCP: Plugin does not start

I wrote a new plugin for my eclipse rcp application and added the plugin to the dependencies of my product. I also tried to set the auto-start value of the new plugin to true but it does not start. It shows up as resolved but not as started.
Basically the only thing that this plugin does is to add a help file (table of contents) via the extension point org.eclipse.help.toc.
Any idea why the plugin code isn't executed?
Also: the plugin adds its content if I execute it from inside eclipse. The problem occures after I export it.
Just to be clear ... you're not expecting 'code' to run, but when you launch the exported RCP application standalone, the help contents does not appear in the TOC, right?
How did you define your RCP product? As a feature or plug-in based product?
If based on plug-in's, did you define all the necessary plug-in's on the product dependencies tab?
If based on features, did you add the new plug-in to the feature?

Checkstyle: Custom Rules - Eclipse Plugin

I have written few custom checkstyle rules using checkstyle API. They run fine using Maven (after I add the new project as a dependency to the checkstyle plugin).
Now I want these rules to be used by the Eclipse Checkstyle plugin. And this is where I am stuggling.
I've downloaded the sample plugin project (as suggested here and here).
I do not understand what to do next after reading these links.
Do I need to export my project as a JAR?
How do I plug it into my existing Checkstyle plugin?
Thanks
You can do it like following :
Create plugin project and add your custom checks there.
Make appropriate changes to plugin.xml, checkstyle_packages.xml.
Export the project as Deployable Plug-ins and fragments (Export > Plug-in Developement)
Copy the jar file to Eclipse Plugin folde, so no need to install your custom check .
You can refer this tutorial
You already have the correct links that will eventually get you there. As for your questions:
All your custom checks can go into one JAR file. That JAR file must be an Eclipse plugin JAR. I simply install it by copying it to the Eclipse dropins folder, but there may be more elegant ways to do that.
So you end up with two plugins: The original, unmodified Eclipse-CS, and your own plugin which contains the custom checks. When both are independently installed in Eclipse, the Eclipse-CS configuration dialog will offer your custom checks for use in Checkstyle configurations.

Can an Eclipse RCP plugin and feature coexist in the same project?

Same question stated another way: Can an Eclipse project be both a plugin project and a feature project?
We have 3 Eclipse projects in our source code for every component in an application, like this:
pkg.component.name
pkg.component.name.rcp
pkg.component.name.rcp.feature
pkg.component.name is a plugin project that contains all of the non-rcp Java source code for the component.
pkg.component.name.rcp is a plugin project that contains the RCP-specific Java source code.
pkg.component.name.rcp.feature is a feature project that only contains two files: build.properties and feature.xml. build.properties contains one line: bin.includes = feature.xml
Is there any reason why we can't define the feature in the pkg.component.name.rcp project?
Reducing our project count by roughly a third would be nice.
One of my colleagues told me he had problems doing that and I don't want to troubleshoot something that isn't possible or that is proscribed just to have fewer projects.
It's not possible to do. While plugins use the MANIFEST.MF and plugin.xml and features use the feature.xml, both use the build.properties (to allow building) and they both need to fill it with different things. They also both have different .project information (different builders, different natures) for use within eclipse.