How to create custom configuration editor plugin for Eclipse? - java

I would like to create the configuration editor plugin for my XML configuration file which would be similiar to this.
I was searching how I can create Eclipse plugin and I didn't find any plugin option which would allow me to do that. Only thing which is close to what I want is custom editor but it would be very tedious write entire configuration logic and I would like to use some existing tools.
Thank you for advices.

I think you would have to create a custom editor using the forms API, see Eclipse form based XML editor

Related

Extending Existing Eclipse Editors

Is this possible?
Here is the problem I am trying to solve:
I have 3 configuration files one .ini, one .config, and one .json
Then I have a bunch of SQL files that have sort-of a customized version of sql in them.
I need to do some syntax validation on these files, and I also added syntax highlighting. In the performSave function I made a call to the validator.
It would be nice to have this update dynamically as you typed, but I couldn't figure that part out just yet.
My problem is this: most of these config files and sql files have our own special brand of syntax, but the JSON file is just a regular old json file so it seems silly to create my own editor and re implement syntax coloring for something so widely in use. I was hoping that I could just extend a current existing editor already in eclipse then just add my hooks where I need them.
Heres what I have done so far:
I created some Eclipse plugins for work ing with these files. Most notably I have created a .sql editor, a .config editor, and a .ini editor. So for the most part I know how to create an editor and do my syntax coloring and problem marking etc. I would just like to ride the coat tails of someone who has already created a JSON editor so that all I need to add is my validation calls.
If you have any insight into extending an existing editor that would be great.
Also any help with where to put my validator call to mark up files while they are being created except on a save would be awesome too.
-Best,
Jeff
Have you considered using Xtext to get a feature rich editor (on the fly syntax correction, code completion etc..) rather than implementing from scratch ?
For JSON, the grammar fits in a few lines :
https://gist.github.com/nightscape/629651
Just build a "New->Xtext Project", then stick this grammar into it and run as "Generate Xtext artifacts", you'll get an extensible editor in no time.
There is a feature to add validation rules checked on the fly easily using Java or Xtend.

Developing an Eclipse Content Assist plugin

I am trying to extend the default behaviour of content assist for XML files in Eclipse (Helios or lower). I need to add some predefined list items in an XML file when a user types a particular string and presses Ctrl+Space.
I tried to search over the internet and got some basic knowledge from Eclipse Help and from this blog. However, being a newbie in writing plugins, I'm unable to figure out some points, like
What should be the plugin template?
or where will the implementing class reside?
I am unable to find any tutorial which can explain it in a better way. Any suggestions in terms of useful links/tutorials would be a great help.
TIA.
The help you link to is for developing content assist in a new editor. If what you want is to add to the existing Eclipse WST XML editor then you have to use the org.eclipse.wst.sse.ui.completionProposal extension point defined by WST to add content proposals. There is an example here

Properties editor Ui to use in swt/jface application

I am currently working on a project where i have a need to integrate/build a properties editor (like Jboss tools properties editor open in eclipse for editing hibernate configuration files) in my desktop application. I was looking for some good ready to use UI plugin to just integrate in my application or with small changes in the source code of the plugin to make that working according to my needs. Can someone please redirect me to the right way.
Thanks
Take a look at http://www.eclipse.org/sapphire/
In the past, I was using Eclipse Structured Source Editing framework. It gives you extensible XML source editor (e.g. you get most source editor features like syntax highlight, code completion - but you can extend and customize those features) - and you can create an Eclipse Forms-based visual editor that would use the SSE XML DOM as a model (e.g. you may add listeners to DOM nodes - to keep your visual editor in sync with the modifications user makes to the source code.
I found a good SWT wrapper, which has provided some ready to use widgets, PropertyTable is one of them.
https://code.google.com/a/eclipselabs.org/p/opal/wiki/PropertyTable
Hope this will help others.
Hibernate configuration files are xml so you should be able to edit them with the standalone Eclipse IDE. When creating a Hibernate Configuration file you would just save it as configuration.cfg.xml and for hibernate class mapping files you would do className.hbm.xml.
I wouldn't say you would need a plugin to create and edit hibernate configuration files. Hibernate will know what to do with the file when it runs as long as they are in the correct build path.
I hope this helps or at least points you in the right direction.

Can you use JAXX with Eclipse?

I'm wanting to style Swing components with CSS and saw this as my best bet. But I'm having a bit of a problem just finding out if I can use it with Eclipse?
Is it also practical for a medium sized project, or should I be looking for another way to style components?
Here is the Document for your answer
https://docs.google.com/document/d/19bYF0z5sNiwT-zL5VAZBY1CM0MgHA6pqzZ8dP22llvc/edit?usp=sharing
I am not an expert on a subject of Swing and especially JAXX, but I know a thing or two about Eclipse. If this question is still relevant, you can take my answer as a basis to do some more research.
I searched an Eclipse Marketplace and googled a bit but found nothing about JAXX Eclipse support or plugins. If you know french you can check project's documentation. If there is nothing about tool support in the documentation, I suggest you ask the creators directly.
Eclipse gives you some tools you can use to work with file types JAXX uses. From what I have read here, *.jaxx files are just XML files and stylesheets are just a CSS. I suggest you install XML and CSS support through Eclipse Web Tools Platform and associate *.jaxx files with XML editor either when you first open one of the files with such extension or through File Associations Preferences. In order to compile *.jaxx files you can configure Eclipse Project Builder or use an External Tools launcher.
By the way, have you considered using JavaFX?
#duemir
I have mentioned same thing in my Answer Document.
Please check the Above answer by Me (Jugal Thakkar)
OR
Click on this Link
Go to your Link and Check the Resource in that page and try to go Official Website of JAXX.
You are not able to Go on Official Project Page (www.jaxxframework.org/).
I have mentioned all things in My Document so please first go through that.
I can conclude that on This Question.
1) This Project is not Officially Working. because you can't open official Project Website.
so you are not able to access docs and other stuff.

GUI for Editing XML?

i need to create GUI for editing xml document showing the XML in tree view and displaying the need node name and value in a text box for editing. Please let me know if any tool/framework available for this.
Note: its a web application using jsp
You could use eclipse. Download "Eclipse IDE for Java Developers" from http://www.eclipse.org/downloads/.
You may want to have a look on Eclipse or Netbeans platform as a start.
These are for desktop applications. Not sure if you are looking for webApp or desktop app since you didn't mention it in your question.
I don't any specific toolkit that could build a GUI for you but xml spy could give you ideas on how you want your GUI to look like:

Categories

Resources