Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Java Type Package Support
Java Type Package Support [message #1239565] Tue, 04 February 2014 13:35 Go to next message
Andreas Weise is currently offline Andreas WeiseFriend
Messages: 37
Registered: January 2014
Member
I've read the documentation about JDT Support and also took a look at the samples. But unfortunately I couldn't find anything for selecting a Java Package. Also the browsing support does not cover JDT packages.

In our use case we want to select a existing java package or create a new. Is there anything I missed in the out-of-the-box features?

I was looking for something like the Java Package selection when creating a new Java artifact using JDT.

I already have a non-sapphire wizard, where I've integrated this kind of dialog. I could image to also use this dialog via a Custom Form Component. I could not found documentation/sample for creating a Custom Form Component. What would be the steps to integrate such a custom dialog.

Thanks
Re: Java Type Package Support [message #1239612 is a reply to message #1239565] Tue, 04 February 2014 15:43 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
There is currently no browse support for Java packages. Please open an enhancement request.

You do not need to make a custom form component to provide custom browsing, all you need to do is to implement a browse action handler. Then attach it either locally to specific property editor instances in sdef or globally via Sapphire extension system by providing an activation condition. See JavaTypeBrowseActionHandler in org.eclipse.sapphire.java.jdt.ui bundle as one example. If you wish to contribute a patch for this enhancement, it would be most welcome. We can help you get started with patch development and contribution process.

[Updated on: Tue, 04 February 2014 15:44]

Report message to a moderator

Re: Java Type Package Support [message #1239907 is a reply to message #1239612] Wed, 05 February 2014 09:59 Go to previous messageGo to next message
Andreas Weise is currently offline Andreas WeiseFriend
Messages: 37
Registered: January 2014
Member
Yes. I will try to contribute this.

I already got the git projects imported, so the basic setup for development is fine.
- You might need to tell me where to find code formatter template (in case you use one)
- Sapphire does not use eclipse's gerrit. where are you pushing to?
Re: Java Type Package Support [message #1239969 is a reply to message #1239907] Wed, 05 February 2014 12:17 Go to previous messageGo to next message
Andreas Weise is currently offline Andreas WeiseFriend
Messages: 37
Registered: January 2014
Member
One point to discuss is, if this enhancement should be integrated into the existing JavaType construct.

JDT doesn't know a type PACKAGE and therefore Sapphire shouldn't try to do that.

Instead a @JavaPackageConstraint could be introduced.

Type String of the property + this annotation would be the only condition for a JavaPackageBrowseActionHandler to get activated.

What do you think?
Re: Java Type Package Support [message #1240088 is a reply to message #1239969] Wed, 05 February 2014 17:11 Go to previous message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Quote:
Yes. I will try to contribute this.


Excellent! Always good to see new contributors to the project.

Quote:
- You might need to tell me where to find code formatter template (in case you use one)


A specific code style is not required. I am not opposed to sharing the one I use, but at the end of the day I'd rather people used what they are comfortable with.

The one hard requirement is the header block and an @author tag in class javadoc. You can copy these from an existing class and substitute your own info.

Quote:
- Sapphire does not use eclipse's gerrit. where are you pushing to?


We still use the older approach of attaching a patch to Bugzilla. So once you've made your changes go through Team -> Create Patch and attach the resulting file.

You will also need to accept Eclipse Contributor License Agreement (CLA) before your patch can be accepted.

https://wiki.eclipse.org/CLA

Quote:
One point to discuss is, if this enhancement should be integrated into the existing JavaType construct.

JDT doesn't know a type PACKAGE and therefore Sapphire shouldn't try to do that.

Instead a @JavaPackageConstraint could be introduced.

Type String of the property + this annotation would be the only condition for a JavaPackageBrowseActionHandler to get activated.


There is an existing JavaPackageName class that is already used for value properties, so JavaPackageBrowseActionHandler should activate based on that type.
Previous Topic:Button for Sapphire.Jump.Java.Type action handler
Next Topic:Enable row level validation markers
Goto Forum:
  


Current Time: Tue Mar 19 07:46:53 GMT 2024

Powered by FUDForum. Page generated in 0.03837 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top