Developing an Eclipse Content Assist plugin - java

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

Related

Java UML editable component/lib

I have a task where we need to generate UML(or similar) from XML and will be able to edit text, property type and drag dependency row. But I can't find any Java lib or component wich will allow me to do such.
For example PlantText is a good lib but it does not allow to make edit.
If someone known such lib/compoment please share.
Thanks
EDIT:
Sorry, maybe I wasn't wrote clear. Actually, I need library which I can implement into my project, and after I will be able to generate UML from my project, then edit it and save into XML.
draw.io is very good site where you can create (not only) UML's and save them to XML file so in future you can edit it. The drawback is it is not automatic and must be drawn from scratch.

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.

Generating CCD document using MDHT API

I am trying to use MDHT API to generate CCD documents. I am doing this in the following way.
Downloaded Java runtime libraries and placed them in classpath and writing code to generate all the sections using MDHT API.
Writing code for each section is taking long (a bit complicated). I was wondering if I am missing anything. Is there any open source mdht GUI that generates code for each section or am I moving in the right direction?
I am currently stuck at Medications Section/Immunization Section. Can anyone please redirect me to any examples/tutorials related to each section. I have already looked at user guide/developers guide.
Any help is appreciated.
I think MDHT API will only provide a Model for the CCD document.
if it contains any default implimentaion to generate CCD document,,i dont know..
any way better you just generate the XML in DOM,STAXs API.
CCD example link
Another better API that i found is MIRTH
follow the link
Mirth User guide
The best place to look for help/sample code is the developers forum: Eclipse Community Forums » Model Driven Health Tools.
You may need to create a (free) account to get access.
You could also go to the forums to post your specific MedicationsSection/immunization question for a possible specific answer.
Another good site is CDA tools: MDHT Developers Guide. Look at Produce CDA Content using MDHT API.
There are countless examples of building documents in the test code projects.
Download the All In One (MDHT_CDATools) from GitHub linked in the MDHT project site and look at the code in the test projects such as: org.openhealthtools.mdht.cda.consol.example
The closest (current) thing to a GUI based document building application in MDHT would be using the all in one to modify the existing models and generate sample snippets/documents that way (or creating a model from scratch, which includes only what you need). If you wanted the entire document produced in XML, you could then generate the instance from GeneralHeaderConstraints as opposed to any of the many child templates (which would give you snippets). Either way, this is not really the intention of the model interface (it's more for conformance) and would take you far longer to implement than using the API itself - which accesses the models which already exist in order to auto-generate conformant content quickly.

What are the common tricks in eclipse when working with jsp files?

I looked through this list of “Hidden” features/tricks for Eclipse?", but it doesn't have anything for web-developement (jsp). A very useful list of tricks for a general eclipse user!
I work with jsp pages in Eclipse Ganymede, and I would like to find out a list of shortcuts commonly used to facilitate development. I always seem to struggle with the following, among other issues:
always traverse a directory tree to find a file (no Ctrl-shift-t just like java classes)
search is always ends up with either ctrl-f or searching the entire project
I would appreciate if you guys list tricks for eclipse, specifically for web-development (jsp/tomcat)
I am a noob, so don't hesitate to list anything even if you think it is TOO NOOB!!!
Thanks
my favorite:
ctrl + shift + r will open a resource dialog like the type dialog
Refer 30 Useful Eclipse Keyboard Shortcuts for Java Programmers for more.
First of all, be certain you use the Java EE version of Eclipse.
Edit:
Use Ctrl-Shift-R to locate a given resource (also known as "file").
You can use F3 on java identifiers in <%...%> to go to their definition.
The best tip I can give you is to learn JSF or similar so your JSP files only contain tags, and not java snippets.
I use the MyEclipse plugin. I have been very happy with it and it has a lot of jsp support.
MyEclipse
Get the Web Tools Platform plugin. I think it's included by default in the Jave EE edition of Eclipse, but you can also install it separately. To see if it's installed in your Eclipse, open the Help|About screen and look for a "WTP" icon.
It doesn't provide any web-specific shortcuts, but it will give you syntax highlighting and some auto-completion for HTML and CSS files, and for JSP files, enable many of the navigation features that you're used to from Java editing. (Such as Ctrl+Space to import a class and F3 to see its definition.)
Regardless of whether you have WTP installed or not:
Use Ctrl+Shift+R to open files; this works much like Ctrl+Shift+T for opening classes.
Use Ctrl+H to search the whole of your project, or parts of it. If you pick the "File search" tab, you can specify file patterns (such as *.jsp) to search in. If you click on a folder in the Package Explorer, you can select "Selected resources" from the "Scope" box to search only in that folder (and its sub-folders).

Categories

Resources