Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Sapphire » Exporting a Sapphire plugin
Exporting a Sapphire plugin [message #762110] Wed, 07 December 2011 15:08 Go to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Hello,
I'm at the point where I would like to export my Sapphire plugin and install it on a client's Eclipse installation.

I'm a bit confused regarding the correct way to do this so Sapphire is supported by the client installation:
Is this something that is done by customBuildCallbacks.xml? Or is the client required to install the Sapphire plugins separately.
Pardon the triviality if that is the case.

Thanks a lot,
Roded

[Updated on: Thu, 08 December 2011 17:13]

Report message to a moderator

Re: Exporting an Sapphire plugin [message #762204 is a reply to message #762110] Wed, 07 December 2011 17:40 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Sapphire is a separate installable unit that is a dependency of your plugin. Users can install Sapphire explicitly or you can ensure that Sapphire is automatically found and installed by including Sapphire in your plugin's repository. You can make this part of your plugin build. Google for "p2" (Eclipse provisioning system) to get information on commands you can use to manipulate repositories, etc.

- Konstantin
Re: Exporting an Sapphire plugin [message #762292 is a reply to message #762204] Wed, 07 December 2011 20:22 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Gotcha,
So customBuildCallbacks.xml is for including .apt_generated in my plugin's build?
Re: Exporting an Sapphire plugin [message #762333 is a reply to message #762292] Wed, 07 December 2011 22:33 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Gotcha,
So customBuildCallbacks.xml is for including .apt_generated in my plugin's build?
Re: Exporting an Sapphire plugin [message #762337 is a reply to message #762292] Wed, 07 December 2011 22:41 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
That's right. The customBuildCallbacks.xml file integrates with PDE Build (a commandline build system for building Eclipse plugins). It covers Sapphire stuff that's outside basic Java compilation... APT code generation, automatic externalization of strings, etc.

- Konstantin
Re: Exporting an Sapphire plugin [message #762375 is a reply to message #762337] Thu, 08 December 2011 00:37 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
In that case, in customBuildCallbacks,
where should sapphire.classpath point to?
Re: Exporting an Sapphire plugin [message #762564 is a reply to message #762337] Thu, 08 December 2011 10:05 Go to previous messageGo to next message
St Clair Clarke is currently offline St Clair ClarkeFriend
Messages: 118
Registered: March 2010
Senior Member
Hello Roded,
Did you use any JavaBean in your application? If so, how did you accomplish this? I am about to give up on Sapphire because of this issue at present.

I would appreciate any help.

Thanks
Re: Exporting an Sapphire plugin [message #762604 is a reply to message #762564] Thu, 08 December 2011 11:26 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Hi St Clair Clarke,
Not sure what you mean exactly..
My usage of Sapphire is for building and editing proprietary XML files. I have no persistence at the moment.
Roded
Re: Exporting an Sapphire plugin [message #762752 is a reply to message #762604] Thu, 08 December 2011 15:24 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Quote:
In that case, in customBuildCallbacks,
where should sapphire.classpath point to?


Try this:

<path id="sapphire.factorypath">
    <fileset dir="${eclipse.home}/plugins" includes="*.jar"/>
</path>
Re: Exporting an Sapphire plugin [message #762757 is a reply to message #762752] Thu, 08 December 2011 15:29 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
The following error occurred while executing this line:
C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\build.xml:408: The following error occurred while executing this line:
C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\build.xml:325: The following error occurred while executing this line:
C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\customBuildCallbacks.xml:54: The following error occurred while executing this line:
C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\customBuildCallbacks.xml:83: The following error occurred while executing this line:
C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\customBuildCallbacks.xml:129: Problem: failed to create task or type var
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


(posted instead of previewed..)
I'm getting the above error. It's the same error that resulted in using the original customBuildCallbacks.xml.
Any idea what might be wrong?
Thanks

Edit: I'm guessing manifestclasspath is failing for some reason due to the classpath..

[Updated on: Thu, 08 December 2011 15:34]

Report message to a moderator

Re: Exporting an Sapphire plugin [message #762762 is a reply to message #762757] Thu, 08 December 2011 15:35 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
The build script needs access to ant-contrib library. You will need to download it separately and place it on your system. Look for the following block and change the path accordingly:

<taskdef resource="net/sf/antcontrib/antlib.xml">
  <classpath>
    <pathelement location="../../releng/ant-contrib/ant-contrib-1.0b3.jar"/>
  </classpath>
</taskdef>
Re: Exporting an Sapphire plugin [message #762776 is a reply to message #762762] Thu, 08 December 2011 16:01 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
That fixed that.
Oddly enough, there seems to be a compilation issue now:
C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\customBuildCallbacks.xml:93: Compile failed; see the compiler error output for details.

Seems more likely this is a configuration issue rather than code..
Is the PDE log written anywhere?
Re: Exporting an Sapphire plugin [message #762808 is a reply to message #762776] Thu, 08 December 2011 16:41 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I think its referring to console output before that line. Do you see anything there?

- Konstantin
Re: Exporting an Sapphire plugin [message #762813 is a reply to message #762808] Thu, 08 December 2011 16:49 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
I should also mention that you can copy a ready-made build system that knows how to build Sapphire-based plugins from this project:

http://www.eclipse.org/projects/project.php?id=webtools.java-ee-config

You will need to use Git to access its source repository. You can also gain some p2 knowledge by reading through the build scripts in that project.

Some of the adopters have had success building Sapphire-based plugins with Maven/Tycho, but I am not a Maven expert so I tend to stick to Ant for my build needs.

http://wiki.eclipse.org/Sapphire_Modeling_Tycho_build_support

Hope this helps.

- Konstantin
Re: Exporting an Sapphire plugin [message #762870 is a reply to message #762604] Thu, 08 December 2011 18:42 Go to previous messageGo to next message
St Clair Clarke is currently offline St Clair ClarkeFriend
Messages: 118
Registered: March 2010
Senior Member
Thanks for the reply Roded,

I was hoping that someone has already use Sapphire and JavaBeans together. I use JDO. I like Sapphire but it cannot help me in JDO currently since I cannot make the link between the JavaBeans that I would persist to the database and Sapphire's XML.

Re: Exporting an Sapphire plugin [message #762899 is a reply to message #762870] Thu, 08 December 2011 19:34 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
St Clare,

I know it is a pretty labor-intensive solution, but you could write JavaBeans by hand (or using your favorite bean generator) and then write some code to copy values back-n-forth between Sapphire model and your beans as part of persistence to JDO. Heck, you could even use reflection to write the read/write routines in a generic manner so that you don't have to write a pair per bean.

- Konstantin
Re: Exporting an Sapphire plugin [message #762901 is a reply to message #762899] Thu, 08 December 2011 19:36 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Forgot to mention that if you do use that approach, create Sapphire model with no-argument ModelElementType.instantiate() method. That will give you in-memory resource, since you wouldn't be using Sapphire for persistence (XML or otherwise).

- Konstantin
Re: Exporting an Sapphire plugin [message #762936 is a reply to message #762901] Thu, 08 December 2011 20:47 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Nothing in the console..
I've added a <record> in customBuildCallbacks and got the following:
(entire log file attached below)
...
The ' characters around the executable and arguments are
not part of the command.
      [apt] Files to be compiled:
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IArgsContainer.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IDataSourceRow.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IDynamicDataSource.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IParameter.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IParametersContainer.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IReport.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IRowsContainer.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\ISQLDataSource.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\ISimpleDataSource.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IStaticDataSource.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IValue.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDChoice.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDChoiceComparison.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDChoiceType.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDConstant.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDFieldReference.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDFormat.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDList.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDNamed.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDNamedValue.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDParameterReference.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDSearchPattern.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\IXSDValue.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\internal\ActivatorReportSapphire.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\internal\actions\ParameterReferenceJumpHandler.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\internal\conditions\PropertyExistsCondition.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\internal\services\ContentProposalServiceSearchPattern.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\internal\services\DerivedValueServiceResource.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\internal\xmlbinders\ValueNoBinder.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\ui\ReportEditor.java
    C:\Users\rodedb\Desktop\Roded\Workspaces\plugin_workspace\com.modelity.eclipse.structures.sapphire.report\src\com\modelity\eclipse\structures\sapphire\report\ui\SourceToDesignAction.java
      [apt] An exception has occurred in apt (1.6.0_26). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
      [apt] java.lang.NullPointerException
      [apt] 	at com.sun.tools.apt.comp.Apt$AptTreeScanner.visitAnnotation(Apt.java:161)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:1794)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:43)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.visitNewArray(TreeScanner.java:194)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCNewArray.accept(JCTree.java:1294)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.visitAssign(TreeScanner.java:203)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCAssign.accept(JCTree.java:1342)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:43)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.visitAnnotation(TreeScanner.java:272)
      [apt] 	at com.sun.tools.apt.comp.Apt$AptTreeScanner.visitAnnotation(Apt.java:160)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCAnnotation.accept(JCTree.java:1794)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:43)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.visitModifiers(TreeScanner.java:267)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCModifiers.accept(JCTree.java:1816)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.visitVarDef(TreeScanner.java:79)
      [apt] 	at com.sun.tools.apt.comp.Apt$AptTreeScanner.visitVarDef(Apt.java:156)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:691)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:43)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.visitClassDef(TreeScanner.java:66)
      [apt] 	at com.sun.tools.apt.comp.Apt$AptTreeScanner.visitClassDef(Apt.java:146)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:575)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:35)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:43)
      [apt] 	at com.sun.tools.javac.tree.TreeScanner.visitTopLevel(TreeScanner.java:54)
      [apt] 	at com.sun.tools.apt.comp.Apt$AptTreeScanner.visitTopLevel(Apt.java:124)
      [apt] 	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:446)
      [apt] 	at com.sun.tools.apt.comp.Apt.main(Apt.java:213)
      [apt] 	at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
      [apt] 	at com.sun.tools.apt.main.Main.compile(Main.java:1102)
      [apt] 	at com.sun.tools.apt.main.Main.compile(Main.java:964)
      [apt] 	at com.sun.tools.apt.Main.processing(Main.java:95)
      [apt] 	at com.sun.tools.apt.Main.process(Main.java:43)
      [apt] 	at com.sun.tools.apt.Main.main(Main.java:34)
pre.@dot:  duration 5 seconds


  • Attachment: build.log
    (Size: 24.34KB, Downloaded 317 times)
Re: Exporting an Sapphire plugin [message #762949 is a reply to message #762936] Thu, 08 December 2011 21:18 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
That looks like a known bug in APT. Look for a trailing comma in your array declarations in annotations...

This blows up:

@Foo( something = { "a", "b", "c", } )

This is ok:

@Foo( something = { "a", "b", "c" } )

Java language specs allows both forms and Eclipse annotation processor doesn't have a problem with either form.

- Konstantin
Re: Exporting an Sapphire plugin [message #763212 is a reply to message #762949] Fri, 09 December 2011 11:09 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
That was not so much fun..
There seems to be something wrong with the following line:
@XmlElementBinding(mappings = {@XmlElementBinding.Mapping( element = "searchPattern", type = IXSDSearchPattern.class )})

Export runs well when it's commented out and throws a NPE at com.sun.tools.apt.comp.Apt$AptTreeScanner.visitAnnotation(Apt.java:161) when it's there.
It seems fine to me, am I missing something?
Re: Exporting an Sapphire plugin [message #763273 is a reply to message #763212] Fri, 09 December 2011 13:33 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
If you are certain that it is this line that's causing the problem, it would be a different problem then the one I've encountered before. Maybe it doesn't like {} around a single item array. Try removing them, since they aren't necessary anyhow.

- Konstantin
Re: Exporting an Sapphire plugin [message #763344 is a reply to message #763273] Fri, 09 December 2011 15:51 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Thanks for the tips.
The line is a reduction of a multiple item array.
Tried removing the {}s but with no avail.
I find it easier to believe there's something not configured properly on my end.. wrong javac version perhaps?
The entire file is attached.
Re: Exporting an Sapphire plugin [message #763360 is a reply to message #763344] Fri, 09 December 2011 16:30 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
So what version of javac are you using? Sapphire is being regularly exercised with 5 and 6. I don't think anyone has tried 7 yet.

Are you sure that you've looked at all of your java files with annotations for trailing comas in in arrays? Every time I've seen this APT bug, that was always the cause. If you look at the stack trace, you can see it failing on JCTree$JCNewArray.accept (traversal into array construction).

- Konstantin
Re: Exporting an Sapphire plugin [message #763541 is a reply to message #763360] Sat, 10 December 2011 00:04 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Using javac 1.6.0_26 (jdk associated with the sapphire project).
At the moment I have the following files in the src folder.
The uncommented @XmlElementBinding in IXSDValue is the culprit, after commenting it out export works fine.
Is there anything relevant regarding a correct directory structure?

package com.modelity.eclipse.structures.sapphire.report;

import org.eclipse.sapphire.modeling.IModelElement;
import org.eclipse.sapphire.modeling.ModelElementType;
import org.eclipse.sapphire.modeling.annotations.GenerateImpl;

@GenerateImpl

public interface IValue extends IModelElement {
	ModelElementType TYPE = new ModelElementType(IValue.class);
}


package com.modelity.eclipse.structures.sapphire.report;

import org.eclipse.sapphire.modeling.ModelElementType;
import org.eclipse.sapphire.modeling.Value;
import org.eclipse.sapphire.modeling.ValueProperty;
import org.eclipse.sapphire.modeling.annotations.GenerateImpl;

@GenerateImpl
//@Label(standard = "Constant")
public interface IXSDConstant extends IValue
{
    ModelElementType TYPE = new ModelElementType( IXSDConstant.class );

    // *** Constant ***
//	@Label(standard = "Constant")
//	@CustomXmlValueBinding(impl = ValueNoBinder.class)
	ValueProperty PROP_CONSTANT = new ValueProperty(TYPE, "Constant");
	Value<String> getConstant();
	void setConstant(String value);
}


package com.modelity.eclipse.structures.sapphire.report;

import org.eclipse.sapphire.modeling.ElementProperty;
import org.eclipse.sapphire.modeling.IModelElement;
import org.eclipse.sapphire.modeling.ModelElementHandle;
import org.eclipse.sapphire.modeling.ModelElementType;
import org.eclipse.sapphire.modeling.annotations.GenerateImpl;
import org.eclipse.sapphire.modeling.annotations.Label;
import org.eclipse.sapphire.modeling.annotations.Required;
import org.eclipse.sapphire.modeling.annotations.Type;
import org.eclipse.sapphire.modeling.xml.annotations.XmlElementBinding;

@GenerateImpl

public interface IXSDValue extends IModelElement
{
    ModelElementType TYPE = new ModelElementType(IXSDValue.class);

    // *** Value ***
	@Required
    @Label(standard = "Value")
	@Type (base = IValue.class,
	       possible = { 
//	            IXSDSearchPattern.class,
//	            IXSDList.class,
	            IXSDConstant.class
//	            IXSDParameterReference.class,
//	            IXSDFieldReference.class,
//	            IXSDFormat.class,
//	            IXSDChoice.class
	        }
	    )
	@XmlElementBinding( mappings = @XmlElementBinding.Mapping( element = "constant", type = IXSDConstant.class ))
//    @XmlElementBinding ( 
//        mappings = {
//            @XmlElementBinding.Mapping( element = "searchPattern", type = IXSDSearchPattern.class ),
////            @XmlElementBinding.Mapping( element = "list", type = IXSDList.class ),
//            @XmlElementBinding.Mapping( element = "constant", type = IXSDConstant.class ),
//            @XmlElementBinding.Mapping( element = "parameter", type = IXSDParameterReference.class ),
//            @XmlElementBinding.Mapping( element = "field", type = IXSDFieldReference.class ),
////            @XmlElementBinding.Mapping( element = "format", type = IXSDFormat.class ),
//            @XmlElementBinding.Mapping( element = "choice", type = IXSDChoice.class )
//        }
//    )
	ElementProperty PROP_VALUE = new ElementProperty(TYPE, "Value");
	ModelElementHandle<IValue> getValue();
}

Re: Exporting an Sapphire plugin [message #763751 is a reply to message #763541] Sat, 10 December 2011 13:39 Go to previous messageGo to next message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Right,
Seems directories which contain spaces in sapphire.classpath are not supported when used via safe-apt. The problem with the annotations was simply that the annotations' classes were not found (my ${eclipse.home} had a space).
Seems to be working fine now.
Thanks for the help.
Re: Exporting an Sapphire plugin [message #764006 is a reply to message #763751] Sun, 11 December 2011 04:57 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin KomissarchikFriend
Messages: 1077
Registered: July 2009
Senior Member
Wow. I am glad you figured this out. What a nasty issue. Could you open a bug so that we can track fixing safe-apt task to handle paths with spaces?

- Konstantin
Re: Exporting an Sapphire plugin [message #764069 is a reply to message #764006] Sun, 11 December 2011 08:59 Go to previous message
Roded Bahat is currently offline Roded BahatFriend
Messages: 152
Registered: August 2011
Senior Member
Sure. Hope it's ok:
366323
Previous Topic:XML Self closing tags
Next Topic:Recursive editor parts
Goto Forum:
  


Current Time: Sun Dec 04 08:57:57 GMT 2022

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

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

Back to the top