SWT Section/ExpandableComposite in Eclipse e4 Project - java

Is is not possible to use Eclipse Forms (org.eclipse.ui.forms) in pure e4 projects? I want to utilize an ExpandableComposite.
When I start my application using the run/debug configuration everything works find. But as soon as I try to run it from the product configuration or is as a packaged e4 product, I'm getting a "Missing Constraint: Require Bundle: org.eclipse.ui.forms" error.
Also, adding org.eclipse.ui.forms to the list of dependencies and starting the product, seems to alter my plugin.xml contents. After that the CSS style sheet entry is just gone.
Of course I tried googling, but all I could come up with is this article by Lars Vogel "Using Eclipse Forms in Eclipse 4 RCP" where he basically says that CSS styling shall be used over forms, but doesn't say that they don't work together at all.
If, for some reason this will not work, is there anything comparable to the ExpandableComposite widget?

Related

Applying XML coloration style on TextMergeViewer Eclipse

I recently found this guy's website, claiming he had found a way to set XML syntax coloration in a TextMergeViewer, a thing that is not "naturally possible" in Eclipse.
Here is the URL of his website : https://vzurczak.wordpress.com/2010/09/25/merge-compare-dialogs-and-xml-syntax-highlighting/
However, the way he dealt with the issue seems to be not applicable right now (in 2016, and I am running Eclipse 4.4.0). The two major problems I found are the following ones :
StructuredTextViewer cannot be resolved as a type (I see many forums telling that we cannot/could not access it)
It looks impossible to cast a StructuredTextViewerConfigurationXML to a SourceViewerConfiguration.
I am not pretending that he is a liar, but I guess that I missed something, or Eclipse performed some internal changes affecting his code, written in 2010.
If someone knows how to solve these issues, his help would be welcomed.
Thanks for reading.
StructuredTextEditor and related classes are part of the Eclipse Web Tools. In particular the 'Eclipse XML Editors and Tools' feature.
Some downloads of Eclipse include this, other don't. If you don't have it you can install it using 'Install New Software...'. Choose you main Eclipse site and look for 'Eclipse XML Editors and Tools' in the 'Web, XML, Java EE and OSGi Enterprise Development' section.

org.idempiere.fa.model.ModelValidator nulljava.lang.ClassNotFoundException

I am just a newbie on Adempiere. I downloaded the Adempiere's project and run setup. After that, I've got this error and couldn't find the answer on google.
Does anyone have any idea about this error.
The error you have is due to custom code been defined in the ModelValidator window of ADempiere where the custom module is not compiled together into the binary. But as Colin Rooney asked for clarification, your error pop up box is specifying 'iDempiere' in some data. I can see it is ADempiere as the project logo is clearly ADempiere's and not to be the newer fork, iDempiere's. Also in your error-stack the log name is ADempiere.
Nevertheless the issue is the same for both. Just go to your database (most likely Postgres) go to the ModelValidator table and the FA module record, uncheck the IsActive field or delete the record.
To introduce the FA module you have to first compile it together with the whole ADempiere codebase before deploying.
iDempiere is different, as it does not lock modules in its meta data anymore. It is injected purely by OSGi plugin much like how Eclipse IDE works. I have a movie comparing both ways of deploying custom changes: http://youtu.be/Pm0DzUbVhes
I downloaded the Adempiere's project and run setup.
Did you download Adempiere or iDempiere? From the error it looks like iDemiere but that's not what you say. For support questions like this on Adempiere you'd be better asking for help in their forums or their gitter room
Stackoverflow is directed at developers and development/coding issues.

Branding an Eclipse RCP app

I have a RCP app which I want to "brand", i.e. create a proper text for the about box with build id. Simple stuff. Unfortunately this wasn't as easy as I had hoped, and now I am stuck.
My RCP project is launched from a project configuration and is not deployed as plugins through features.
I have tried entering stuff directly in the product configuration -> branding tab, but when I do, the input isn't formatted, meaning I have no newlines and no possibility to externalize strings like I want to. I have also tried creating about.ini, about.properties and about.mappings in an attempt to use the %< property >, but still no luck. The about box is a standard org.eclipse.ui.help.aboutAction.
Every tutorial on the net says different things, so now I feel pretty confused. I have also tried to replicate what is done with branding in the Eclipse repos, without any luck.
Does anyone know what I'm doing wrong?
What is needed is this line in the MANIFEST.MF file:
Bundle-Localization: plugin
guido's comment on my question sheds some light on what the different files are for as well.

JSP errors, disable in Eclipse Juno

I have Eclipse, the Juno release. Just recently I am getting a few JSP errors which aren't valid or I don't care to see. Examples of the errors are below.
The function fn:replace is undefined
Attribute (cellpadding) is obsolete. Its use is discouraged in HTML5 documents.
The function error is not valid, as it working perfectly fine when I run the web application. I simple don't care the HTML5 related obsolete messages. I'd like Eclipse to not display these "errors".
I've tried enabling project specific validations, and turning off the HTML, JSP, & Tag validators, but it made no difference.
Maybe you mean that your project is using using older type of (x)html. If you don't like Eclipse falling by default to HTML5, go to project properties, then Web Content Settings, then in Document Type select the one you use.

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