Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Difficulty with profile API
Re: Difficulty with profile API [message #468703] Mon, 22 January 2007 05:42 Go to next message
Praveen is currently offline PraveenFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0068_01C73DBE.42B55890
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0069_01C73DBE.42B55890"


------=_NextPart_001_0069_01C73DBE.42B55890
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however since =
my application was previously running using org.eclipse.uml2_1.1.0.jar, =
org.eclipse.uml2.common_1.1.0.jar, org.eclipse.emf.ecore_2.1.0.jar, =
org.eclipse.emf.ecore.xmi_2.1.0.jar, org.eclipse.emf.common_2.1.0.jar. I =
disabled all of the above plugins. Now my current configuration only =
contains the eclipse platform, sdk, rcp installed as a plugin (attached =
screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the attached =
code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the profile =
from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under development. =
So, are you saying that you are using UML2 2.0 with Eclipse 3.2 and EMF =
2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to confirm =
which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF 2.2.

How should I check the configuration? The exact same code and the =
libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a workbench. =
Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to see =
references to UML2Package or UML2Resource in code based on the latest =
API (they were replaced with UMLPackage and UMLResource as of UML2 =
2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model and a =
profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if profile =
is applied on model elements works fine in regular java i.e. non plugin =
evironment, but when I try to do this from within a plugin, the system =
hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a plugin =
context or not?

public static String verifyModel(String metaModelFile) throws =
IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, resourceSet);
}

public static Model loadModel(String modelFile, ResourceSet =
resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, ResourceSet =
resourceSet) {
Profile profile =3D null;

Resource inputResource =3D resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_001_0069_01C73DBE.42B55890
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running eclipse =
3.2 with EMF=20
2.2.1 and UML 2.2.0.1, however since my application was previously =
running using=20
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar,=20
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar,=20
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my=20
current configuration only contains the eclipse platform, sdk, rcp =
installed as=20
a plugin (attached screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create a =
project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system hangs when =
I make an API=20
call to these jars. In the attached code, the system hangs in =
NewAction.java=20
-&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise on how =
to resolve=20
this and load the model and the profile from within a plugin =
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks for your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2 2.1 is=20
still under development. So, are you saying that you are using UML2 =
2.0 with=20
Eclipse 3.2 and EMF 2.2? I'd suggest selecting the 'Help &gt; About =
Eclipse=20
SDK' to confirm which versions of the UML2 plug-ins are=20
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in the =
platform=20
log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am using UML =
2.1 and not UML=20
2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How should I =
check the=20
configuration? The exact same code and the libraries work fine in =
standalone=20
java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works stand-alone =
should also=20
work in a workbench. Are you seeing any exceptions in the platform =

log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are using UML2 =
2.x? I=20
wouldn't expect to see references to UML2Package or UML2Resource =
in code=20
based on the latest API (they were replaced with UMLPackage and=20
UMLResource as of UML2 2.0)... Could there be a problem with your=20
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am trying =
to use the=20
following code to open a model and a profile in an eclipse =
plugin using=20
the UML 2.1 API libraries. </FONT><FONT face=3DCourier =
color=3D#000080=20
size=3D2>The libraries are added in the plugin.xml -&gt; Runtime =
-&gt;=20
Classpath tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The following =
code to load=20
a model, profile and check if profile is applied on model =
elements works=20
fine in regular java i.e. non plugin evironment, but when I try =
to do=20
this from within a plugin, the system hangs after ResourceSet=20
resourceSet =3D new ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Should the =
code change=20
depending on whether its in a plugin context or =
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>public static =
String=20
verifyModel(String metaModelFile) throws IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp; String=20
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, ResourceSet =

resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; Resource =
resource =3D=20
resourceSet.getResource(uri, true);<BR>&nbsp;&nbsp;&nbsp; Model =
model =3D=20
(Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile profile =3D =
null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch =
(IOException=20
exception) {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; while=20
(iterator.hasNext()) =
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
Object currentObject =3D=20
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
if=20
(currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BODY></HTML>

------=_NextPart_001_0069_01C73DBE.42B55890--

------=_NextPart_000_0068_01C73DBE.42B55890
Content-Type: application/msword;
name="PluginInfo.doc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="PluginInfo.doc"

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAAB AAAAXgAAAAAAAAAA
EAAAYAAAAAEAAAD+////AAAAAF0AAAD///////////////////////////// ////////////////
//////////////////////////////////////////////////////////// ////////////////
//////////////////////////////////////////////////////////// ////////////////
//////////////////////////////////////////////////////////// ////////////////
//////////////////////////////////////////////////////////// ////////////////
//////////////////////////////////////////////////////////// ////////////////
//////////////////////////////////////////////////////////// ////////////////
//////////////////////////////////////////////////////////// ///////////////s
pcEAcWAJBAAA+BK/AAAAAAAAEAAAAAAABgAAAggAAA4AYmpianFQcVAAAAAA AAAAAAAAAAAAAAAA
AAAJBBYALhAAABM6AQATOgEAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAD//w8AAAAA
AAAAAAD//w8AAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAAAKQAAAAAAKQD AAAAAAAApAMAAKQD
AAAAAAAApAMAAAAAAACkAwAAAAAAAKQDAAAAAAAApAMAABQAAAAAAAAAAAAA ALgDAAAAAAAAAAQA
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t+4vXbS2gMbdxx/3NrTzzvjgPrA/5F/+sXi3qMD SgYdEUwLzaQ2ldQ3
JB39p37Sbb6JNN89Wiik+U7SS178tFNOPmGyySBwCEAAAhCAAATGQ6C5SJrH 8JgD9+++/6mPPuPi
J5ylf39NXU07+hsjag9p/iWS8wtsixu6598tOf91knmx+VW4/fsPP6iQlEg6 /AMvfcYLr3zyeNDg
CQQgAAEIQAACUybQSiQdd8rG3afuWNtw6LInP/bsR5w6vy1Jf0vk4pra/J6k Iw+tk+Z7S4ufuVUK
SX0tkt5DUs/zW76f/JQzX/7yZ53+sIdMORnEDgEIQAACEIDAeAi0EkkqjBPP X7t343fPe/hpL3nW
9zzslJPUVbbFY75dtLgnSX20X72eX2hbbDWp/8wfhw+rrSN9iW1+re2ccx72 c6/8vuc8+7zxcMET
CEAAAhCAAAQmTqCtSFL4Tr7g8H0bv/O08858+RWXPuaMh82l0ZFLbPo2pfn2 0eLnRxY/33ZQKySl
jfStSAee/JSzXvuaF1/14qdOPBOEDwEIQAACEIDAqAh0IJJUPKdccHjnQ779 lHNP/6mrLnvexRfo
X3BT19Tm3wUwF0aL75mci6WDh+efZVMbSPpZ3Yd08Rt+9aVXvfh7RgUFZyAA AQhAAAIQgEA3Iklx
PPWxGzc+bseZZ2/4sX/yrF/8kRde+tTHKpW0d/41SYsbtRcX3TbM95DmP+em FNLzL7vgP7zlB9/w
+hc/59nnk4bJErjo0ssnGzuBQwACEIDAyAk0/8btWGAH9hze+a3Du+89/ubb 7r3p1rtu+uo3v3zb
HbffeY9SSGc+6tTHP/aRF1181jOfea76PiT5p/3VUnrDddfqFu3XQrgNqjiW z
Re: Difficulty with profile API [message #468709 is a reply to message #468703] Mon, 22 January 2007 13:59 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0021_01C73E03.A0EF74A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? If =
so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however since =
my application was previously running using org.eclipse.uml2_1.1.0.jar, =
org.eclipse.uml2.common_1.1.0.jar, org.eclipse.emf.ecore_2.1.0.jar, =
org.eclipse.emf.ecore.xmi_2.1.0.jar, org.eclipse.emf.common_2.1.0.jar. I =
disabled all of the above plugins. Now my current configuration only =
contains the eclipse platform, sdk, rcp installed as a plugin (attached =
screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under development. =
So, are you saying that you are using UML2 2.0 with Eclipse 3.2 and EMF =
2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to confirm =
which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF 2.2.

How should I check the configuration? The exact same code and the =
libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a workbench. =
Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to see =
references to UML2Package or UML2Resource in code based on the latest =
API (they were replaced with UMLPackage and UMLResource as of UML2 =
2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model and a =
profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a plugin =
context or not?

public static String verifyModel(String metaModelFile) throws =
IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, resourceSet);
}

public static Model loadModel(String modelFile, ResourceSet =
resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_0021_01C73E03.A0EF74A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 as =
2.2.0.1... did=20
you mean 2.0.1? If so, you should see =
org.eclipse.uml2_2.0.1.v200609210850.jar=20
and org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the=20
EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must be a =
problem=20
with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2 with EMF=20
2.2.1 and UML 2.2.0.1, however since my application was previously =
running=20
using org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar,=20
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar,=20
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my=20
current configuration only contains the eclipse platform, sdk, rcp =
installed=20
as a plugin (attached screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create a =
project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system hangs =
when I make an=20
API call to these jars. In the attached code, the system hangs in=20
NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise on =
how to resolve=20
this and load the model and the profile from within a plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks for =
your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2 2.1=20
is still under development. So, are you saying that you are using =
UML2 2.0=20
with Eclipse 3.2 and EMF 2.2? I'd suggest selecting the 'Help &gt; =
About=20
Eclipse SDK' to confirm which versions of the UML2 plug-ins are=20
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in the =
platform=20
log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am using UML =
2.1 and not=20
UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How should I =
check the=20
configuration? The exact same code and the libraries work fine in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works stand-alone =
should also=20
work in a workbench. Are you seeing any exceptions in the =
platform=20
log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are using UML2 =
2.x? I=20
wouldn't expect to see references to UML2Package or UML2Resource =
in code=20
based on the latest API (they were replaced with UMLPackage and=20
UMLResource as of UML2 2.0)... Could there be a problem with =
your=20
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =

message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am trying =
to use the=20
following code to open a model and a profile in an eclipse =
plugin=20
using the UML 2.1 API libraries. </FONT><FONT face=3DCourier=20
color=3D#000080 size=3D2>The libraries are added in the =
plugin.xml -&gt;=20
Runtime -&gt; Classpath tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code to=20
load a model, profile and check if profile is applied on model =

elements works fine in regular java i.e. non plugin =
evironment, but=20
when I try to do this from within a plugin, the system hangs =
after=20
ResourceSet resourceSet =3D new =
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Should the =
code change=20
depending on whether its in a plugin context or =
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>public =
static String=20
verifyModel(String metaModelFile) throws IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp; String=20
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; Resource =
resource=20
=3D resourceSet.getResource(uri, true);<BR>&nbsp;&nbsp;&nbsp; =
Model=20
model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile profile =3D =
null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch =
(IOException=20
exception) {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; while=20
(iterator.hasNext()) =
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
Object currentObject =3D=20
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
if=20
(currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0021_01C73E03.A0EF74A0--
Re: Difficulty with profile API [message #468716 is a reply to message #468709] Mon, 22 January 2007 14:45 Go to previous messageGo to next message
Praveen is currently offline PraveenFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_004E_01C73E0A.1E9E89D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within eclipse, I =
copied and referenced this jar from Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? If =
so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however =
since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF 2.2.

How should I check the configuration? The exact same code and =
the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to see =
references to UML2Package or UML2Resource in code based on the latest =
API (they were replaced with UMLPackage and UMLResource as of UML2 =
2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model and a =
profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a plugin =
context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, resourceSet);
}

public static Model loadModel(String modelFile, ResourceSet =
resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_004E_01C73E0A.1E9E89D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not want =
to use the UML2=20
plugin installed within eclipse, I copied and referenced this jar from=20
Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am not =
getting this=20
error for other libraries that I referenced the same way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure why =
this error is=20
coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 as =
2.2.0.1...=20
did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF=20
plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must be =
a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2 with=20
EMF 2.2.1 and UML 2.2.0.1, however since my application was =
previously=20
running using org.eclipse.uml2_1.1.0.jar, =
org.eclipse.uml2.common_1.1.0.jar,=20
org.eclipse.emf.ecore_2.1.0.jar, =
org.eclipse.emf.ecore.xmi_2.1.0.jar,=20
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above =
plugins. Now=20
my current configuration only contains the eclipse platform, sdk, =
rcp=20
installed as a plugin (attached screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create a =
project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system hangs =
when I make an=20
API call to these jars. In the attached code, the system hangs in=20
NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise on =
how to resolve=20
this and load the model and the profile from within a plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks for =
your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2 2.1=20
is still under development. So, are you saying that you are using =
UML2 2.0=20
with Eclipse 3.2 and EMF 2.2? I'd suggest selecting the 'Help &gt; =
About=20
Eclipse SDK' to confirm which versions of the UML2 plug-ins are=20
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in the =
platform=20
log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am using =
UML 2.1 and not=20
UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How should I =
check the=20
configuration? The exact same code and the libraries work fine =
in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone should=20
also work in a workbench. Are you seeing any exceptions in the =

platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are using =
UML2 2.x? I=20
wouldn't expect to see references to UML2Package or =
UML2Resource in=20
code based on the latest API (they were replaced with =
UMLPackage and=20
UMLResource as of UML2 2.0)... Could there be a problem with =
your=20
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
trying to use the=20
following code to open a model and a profile in an eclipse =
plugin=20
using the UML 2.1 API libraries. </FONT><FONT face=3DCourier =

color=3D#000080 size=3D2>The libraries are added in the =
plugin.xml -&gt;=20
Runtime -&gt; Classpath tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code to=20
load a model, profile and check if profile is applied on =
model=20
elements works fine in regular java i.e. non plugin =
evironment, but=20
when I try to do this from within a plugin, the system hangs =
after=20
ResourceSet resourceSet =3D new =
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Should =
the code change=20
depending on whether its in a plugin context or =
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>public =
static String=20
verifyModel(String metaModelFile) throws IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp;=20
String prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; Resource =

resource =3D resourceSet.getResource(uri, =
true);<BR>&nbsp;&nbsp;&nbsp;=20
Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile profile =3D =
null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch =
(IOException=20
exception) {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; while=20
(iterator.hasNext()) =
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
Object currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if=20
(currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_004E_01C73E0A.1E9E89D0--
Re: Difficulty with profile API [message #468721 is a reply to message #468716] Mon, 22 January 2007 14:56 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C73E0B.93BF0400
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Praveen,

The UML2Package interface is obsolete in UML2 2.x - your application =
cannot use it if you want to run it in an Eclipse environment. You'll =
need to migrate your application code to use the new APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within eclipse, I =
copied and referenced this jar from Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? =
If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however =
since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF =
2.2.

How should I check the configuration? The exact same code and =
the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to =
see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model and =
a profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_0008_01C73E0B.93BF0400
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is obsolete =
in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in an =
Eclipse=20
environment. You'll need to migrate your application code to use the new =

APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =
message=20
<A=20
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not want =
to use the=20
UML2 plugin installed within eclipse, I copied and referenced this jar =
from=20
Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am not =
getting this=20
error for other libraries that I referenced the same way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure why =
this error is=20
coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 as =
2.2.0.1...=20
did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the=20
EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must =
be a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2 with=20
EMF 2.2.1 and UML 2.2.0.1, however since my application was =
previously=20
running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I=20
disabled all of the above plugins. Now my current configuration =
only=20
contains the eclipse platform, sdk, rcp installed as a plugin =
(attached=20
screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create a =
project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system =
hangs when I make=20
an API call to these jars. In the attached code, the system hangs =
in=20
NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise =
on how to=20
resolve this and load the model and the profile from within a =
plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks for =
your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2=20
2.1 is still under development. So, are you saying that you are =
using=20
UML2 2.0 with Eclipse 3.2 and EMF 2.2? I'd suggest selecting the =
'Help=20
&gt; About Eclipse SDK' to confirm which versions of the UML2 =
plug-ins=20
are installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in =
the platform=20
log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =

message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am using =
UML 2.1 and=20
not UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How should =
I check the=20
configuration? The exact same code and the libraries work fine =
in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in=20
message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone should=20
also work in a workbench. Are you seeing any exceptions in =
the=20
platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are using =
UML2 2.x? I=20
wouldn't expect to see references to UML2Package or =
UML2Resource in=20
code based on the latest API (they were replaced with =
UMLPackage and=20
UMLResource as of UML2 2.0)... Could there be a problem with =
your=20
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
trying to use=20
the following code to open a model and a profile in an =
eclipse=20
plugin using the UML 2.1 API libraries. </FONT><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>The libraries are added in the =
plugin.xml=20
-&gt; Runtime -&gt; Classpath tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code to=20
load a model, profile and check if profile is applied on =
model=20
elements works fine in regular java i.e. non plugin =
evironment,=20
but when I try to do this from within a plugin, the system =
hangs=20
after ResourceSet resourceSet =3D new=20
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Should =
the code=20
change depending on whether its in a plugin context or=20
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>public =
static String=20
verifyModel(String metaModelFile) throws IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp;=20
String prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp; =

prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile =
profile =3D=20
null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; =
while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Object=20
currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if=20
(currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML >

------=_NextPart_000_0008_01C73E0B.93BF0400--
Re: Difficulty with profile API [message #468732 is a reply to message #468721] Mon, 22 January 2007 15:29 Go to previous messageGo to next message
Praveen is currently offline PraveenFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0085_01C73E10.32291320
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Kenn,

Thanks for your response.

I cannot modify the existing code as it is being shared by other =
resources.

Can I install uml2-1.1.1 on eclipse 3.2 with emf2.2.1?

If not, then what is a stable configuration for running uml2-1.1.1?

Regards Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2jap$hiq$1@utils.eclipse.org...
Praveen,

The UML2Package interface is obsolete in UML2 2.x - your application =
cannot use it if you want to run it in an Eclipse environment. You'll =
need to migrate your application code to use the new APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within eclipse, =
I copied and referenced this jar from Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? =
If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however =
since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF =
2.2.

How should I check the configuration? The exact same code =
and the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to =
see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model =
and a profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, =
resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D =
inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_0085_01C73E10.32291320
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks for your=20
response.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I cannot modify the =
existing code=20
as it is being shared by other resources.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Can I install =
uml2-1.1.1 on eclipse=20
3.2 with emf2.2.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>If not, then what is =
a stable=20
configuration for running uml2-1.1.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Regards=20
Praveen.</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:ep2jap$hiq$1@utils.eclipse.org">news:ep2jap$hiq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is obsolete =
in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in an =
Eclipse=20
environment. You'll need to migrate your application code to use the =
new=20
APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not =
want to use the=20
UML2 plugin installed within eclipse, I copied and referenced this =
jar from=20
Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am =
not getting this=20
error for other libraries that I referenced the same =
way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure why =
this error is=20
coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 =
as=20
2.2.0.1... did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x =
versions of the=20
EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must =
be a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2=20
with EMF 2.2.1 and UML 2.2.0.1, however since my application was =

previously running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I=20
disabled all of the above plugins. Now my current configuration =
only=20
contains the eclipse platform, sdk, rcp installed as a plugin =
(attached=20
screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create =
a project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system =
hangs when I=20
make an API call to these jars. In the attached code, the system =
hangs=20
in NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =
=3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise =
on how to=20
resolve this and load the model and the profile from within a =
plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks =
for your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2=20
2.1 is still under development. So, are you saying that you =
are using=20
UML2 2.0 with Eclipse 3.2 and EMF 2.2? I'd suggest selecting =
the 'Help=20
&gt; About Eclipse SDK' to confirm which versions of the UML2 =
plug-ins=20
are installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in =
the=20
platform log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
using UML 2.1 and=20
not UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How =
should I check the=20
configuration? The exact same code and the libraries work =
fine in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone=20
should also work in a workbench. Are you seeing any =
exceptions in=20
the platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are =
using UML2 2.x?=20
I wouldn't expect to see references to UML2Package or =
UML2Resource=20
in code based on the latest API (they were replaced with=20
UMLPackage and UMLResource as of UML2 2.0)... Could there =
be a=20
problem with your configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
trying to use=20
the following code to open a model and a profile in an =
eclipse=20
plugin using the UML 2.1 API libraries. </FONT><FONT=20
face=3DCourier color=3D#000080 size=3D2>The libraries =
are added in the=20
plugin.xml -&gt; Runtime -&gt; Classpath =
tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code=20
to load a model, profile and check if profile is applied =
on=20
model elements works fine in regular java i.e. non =
plugin=20
evironment, but when I try to do this from within a =
plugin, the=20
system hangs after ResourceSet resourceSet =3D new=20
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Should the code=20
change depending on whether its in a plugin context or=20
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>public static=20
String verifyModel(String metaModelFile) throws =
IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp;=20
String =
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile, =

ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile =
profile=20
=3D null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; =
}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; =
while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Object=20
currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
if (currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTM=
L>

------=_NextPart_000_0085_01C73E10.32291320--
Re: Difficulty with profile API [message #468735 is a reply to message #468732] Mon, 22 January 2007 16:13 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_001B_01C73E16.56D041C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Praveen,

No, you cannot use UML2 1.1.1 with Eclipse 3.2 and EMF 2.2.1. You'll =
need Eclipse 3.1.x and EMF 2.1.x.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2l90$84a$1@utils.eclipse.org...
Hi Kenn,

Thanks for your response.

I cannot modify the existing code as it is being shared by other =
resources.

Can I install uml2-1.1.1 on eclipse 3.2 with emf2.2.1?

If not, then what is a stable configuration for running uml2-1.1.1?

Regards Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2jap$hiq$1@utils.eclipse.org...
Praveen,

The UML2Package interface is obsolete in UML2 2.x - your application =
cannot use it if you want to run it in an Eclipse environment. You'll =
need to migrate your application code to use the new APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in =
org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within =
eclipse, I copied and referenced this jar from =
Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean =
2.0.1? If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar =
and org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, =
however since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and =
the profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and =
EMF 2.2.

How should I check the configuration? The exact same code =
and the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect =
to see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model =
and a profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check =
if profile is applied on model elements works fine in regular java i.e. =
non plugin evironment, but when I try to do this from within a plugin, =
the system hangs after ResourceSet resourceSet =3D new =
ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, =
resourceSet);
Model model =3D loadModel(metaModelFile, =
resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D =
inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_001B_01C73E16.56D041C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, you cannot use UML2 1.1.1 with =
Eclipse 3.2 and=20
EMF 2.2.1. You'll need Eclipse 3.1.x and EMF 2.1.x.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2l90$84a$1@utils.eclipse.org">news:ep2l90$84a$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks for your=20
response.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I cannot modify the =
existing code=20
as it is being shared by other resources.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Can I install =
uml2-1.1.1 on=20
eclipse 3.2 with emf2.2.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>If not, then what =
is a stable=20
configuration for running uml2-1.1.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Regards=20
Praveen.</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2jap$hiq$1@utils.eclipse.org">news:ep2jap$hiq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is =
obsolete in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in =
an=20
Eclipse environment. You'll need to migrate your application code to =
use the=20
new APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not =
want to use=20
the UML2 plugin installed within eclipse, I copied and referenced =
this jar=20
from Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am =
not getting=20
this error for other libraries that I referenced the same=20
way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure =
why this error=20
is coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of =
UML2 as=20
2.2.0.1... did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x =
versions of=20
the EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There =
must be a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =

message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
running eclipse 3.2=20
with EMF 2.2.1 and UML 2.2.0.1, however since my application =
was=20
previously running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar.=20
I disabled all of the above plugins. Now my current =
configuration only=20
contains the eclipse platform, sdk, rcp installed as a plugin=20
(attached screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then =
create a project=20
and reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system =
hangs when I=20
make an API call to these jars. In the attached code, the =
system hangs=20
in NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =
=3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please =
advise on how to=20
resolve this and load the model and the profile from within a =
plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks =
for your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet,=20
since&nbsp;UML2 2.1 is still under development. So, are you =
saying=20
that you are using UML2 2.0 with Eclipse 3.2 and EMF 2.2? =
I'd=20
suggest selecting the 'Help &gt; About Eclipse SDK' to =
confirm which=20
versions of the UML2 plug-ins are installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing =
in the=20
platform log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
using UML 2.1=20
and not UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How =
should I check=20
the configuration? The exact same code and the libraries =
work fine=20
in standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone=20
should also work in a workbench. Are you seeing any =
exceptions=20
in the platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are =
using UML2=20
2.x? I wouldn't expect to see references to UML2Package =
or=20
UML2Resource in code based on the latest API (they were =
replaced=20
with UMLPackage and UMLResource as of UML2 2.0)... Could =
there=20
be a problem with your configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I =
am trying to=20
use the following code to open a model and a profile =
in an=20
eclipse plugin using the UML 2.1 API libraries. =
</FONT><FONT=20
face=3DCourier color=3D#000080 size=3D2>The libraries =
are added in=20
the plugin.xml -&gt; Runtime -&gt; Classpath =
tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following=20
code to load a model, profile and check if profile is =
applied=20
on model elements works fine in regular java i.e. non =
plugin=20
evironment, but when I try to do this from within a =
plugin,=20
the system hangs after ResourceSet resourceSet =3D new =

ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Should the code=20
change depending on whether its in a plugin context or =

not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>public static=20
String verifyModel(String metaModelFile) throws =
IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D =
new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2>&nbsp;&nbsp;&nbsp; String=20
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D=20
loadProfile(prflPath, =
resourceSet);<BR>&nbsp;&nbsp;&nbsp;=20
Model model =3D loadModel(metaModelFile,=20
resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI =
uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String =
modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; =
Profile=20
profile =3D null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } =
catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; =
}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; =
while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Object =

currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
if (currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return =

=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE=
></BODY></HTML>

------=_NextPart_000_001B_01C73E16.56D041C0--
Re: Difficulty with profile API [message #468741 is a reply to message #468735] Mon, 22 January 2007 18:06 Go to previous message
Praveen is currently offline PraveenFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_00EF_01C73E26.1257C5D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Kenn,

I setup eclipse 3.1 with emf 2.2.1 and uml2 1.1.1 and it nicely solved =
all my problems.

Thanks again Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2nr7$ec0$1@utils.eclipse.org...
Praveen,

No, you cannot use UML2 1.1.1 with Eclipse 3.2 and EMF 2.2.1. You'll =
need Eclipse 3.1.x and EMF 2.1.x.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2l90$84a$1@utils.eclipse.org...
Hi Kenn,

Thanks for your response.

I cannot modify the existing code as it is being shared by other =
resources.

Can I install uml2-1.1.1 on eclipse 3.2 with emf2.2.1?

If not, then what is a stable configuration for running uml2-1.1.1?

Regards Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2jap$hiq$1@utils.eclipse.org...
Praveen,

The UML2Package interface is obsolete in UML2 2.x - your =
application cannot use it if you want to run it in an Eclipse =
environment. You'll need to migrate your application code to use the new =
APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in =
org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within =
eclipse, I copied and referenced this jar from =
Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean =
2.0.1? If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar =
and org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, =
however since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In =
the attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and =
the profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and =
EMF 2.2.

How should I check the configuration? The exact same =
code and the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect =
to see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a =
model and a profile in an eclipse plugin using the UML 2.1 API =
libraries. The libraries are added in the plugin.xml -> Runtime -> =
Classpath tab.

The following code to load a model, profile and =
check if profile is applied on model elements works fine in regular java =
i.e. non plugin evironment, but when I try to do this from within a =
plugin, the system hangs after ResourceSet resourceSet =3D new =
ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String =
metaModelFile) throws IOException {
ResourceSet resourceSet =3D new =
ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, =
resourceSet);
Model model =3D loadModel(metaModelFile, =
resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D =
resourceSet.getResource(uri, true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D =
inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_00EF_01C73E26.1257C5D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I setup eclipse 3.1 =
with emf 2.2.1=20
and uml2 1.1.1 and it nicely solved all my problems.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks again =
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:ep2nr7$ec0$1@utils.eclipse.org">news:ep2nr7$ec0$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, you cannot use UML2 1.1.1 with =
Eclipse 3.2=20
and EMF 2.2.1. You'll need Eclipse 3.1.x and EMF 2.1.x.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2l90$84a$1@utils.eclipse.org">news:ep2l90$84a$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks for your=20
response.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I cannot modify =
the existing=20
code as it is being shared by other resources.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Can I install =
uml2-1.1.1 on=20
eclipse 3.2 with emf2.2.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>If not, then what =
is a stable=20
configuration for running uml2-1.1.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Regards=20
Praveen.</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2jap$hiq$1@utils.eclipse.org">news:ep2jap$hiq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is =
obsolete in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in =
an=20
Eclipse environment. You'll need to migrate your application code =
to use=20
the new APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package=20
is contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do =
not want to use=20
the UML2 plugin installed within eclipse, I copied and =
referenced this=20
jar from Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly =
am not getting=20
this error for other libraries that I referenced the same=20
way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure =
why this=20
error is coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of =
UML2 as=20
2.2.0.1... did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x =
versions of=20
the EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There =
must be=20
a problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked =

eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
running eclipse=20
3.2 with EMF 2.2.1 and UML 2.2.0.1, however since my =
application was=20
previously running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar,=20
org.eclipse.emf.common_2.1.0.jar. I disabled all of the =
above=20
plugins. Now my current configuration only contains the =
eclipse=20
platform, sdk, rcp installed as a plugin (attached=20
screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then =
create a project=20
and reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
system hangs when I=20
make an API call to these jars. In the attached code, the =
system=20
hangs in NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String =
str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please =
advise on how to=20
resolve this and load the model and the profile from within =
a plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many =
thanks for your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =

since&nbsp;UML2 2.1 is still under development. So, are =
you saying=20
that you are using UML2 2.0 with Eclipse 3.2 and EMF 2.2? =
I'd=20
suggest selecting the 'Help &gt; About Eclipse SDK' to =
confirm=20
which versions of the UML2 plug-ins are =
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are =
appearing in the=20
platform log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi=20
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
using UML 2.1=20
and not UML 2.2 with eclipse 3.2 and EMF =
2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How =
should I check=20
the configuration? The exact same code and the libraries =
work=20
fine in standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone=20
should also work in a workbench. Are you seeing any =
exceptions=20
in the platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are =
using UML2=20
2.x? I wouldn't expect to see references to =
UML2Package or=20
UML2Resource in code based on the latest API (they =
were=20
replaced with UMLPackage and UMLResource as of UML2 =
2.0)...=20
Could there be a problem with your =
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I =
am trying to=20
use the following code to open a model and a profile =
in an=20
eclipse plugin using the UML 2.1 API libraries. =
</FONT><FONT=20
face=3DCourier color=3D#000080 size=3D2>The =
libraries are added in=20
the plugin.xml -&gt; Runtime -&gt; Classpath=20
tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>The following=20
code to load a model, profile and check if profile =
is=20
applied on model elements works fine in regular java =
i.e.=20
non plugin evironment, but when I try to do this =
from within=20
a plugin, the system hangs after ResourceSet =
resourceSet =3D=20
new ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Should the code=20
change depending on whether its in a plugin context =
or=20
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>public static=20
String verifyModel(String metaModelFile) throws =
IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D =
new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2>&nbsp;&nbsp;&nbsp; String=20
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT=20
face=3DCourier color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D=20
loadProfile(prflPath, =
resourceSet);<BR>&nbsp;&nbsp;&nbsp;=20
Model model =3D loadModel(metaModelFile,=20
resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =

ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI =
uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model) =

=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String =
modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; =
Profile=20
profile =3D null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; =
try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } =
catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; =
}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
=
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
Object=20
currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
if (currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =

}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; =
return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE=
></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00EF_01C73E26.1257C5D0--
Re: Difficulty with profile API [message #572876 is a reply to message #468703] Mon, 22 January 2007 13:59 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0021_01C73E03.A0EF74A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? If =
so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however since =
my application was previously running using org.eclipse.uml2_1.1.0.jar, =
org.eclipse.uml2.common_1.1.0.jar, org.eclipse.emf.ecore_2.1.0.jar, =
org.eclipse.emf.ecore.xmi_2.1.0.jar, org.eclipse.emf.common_2.1.0.jar. I =
disabled all of the above plugins. Now my current configuration only =
contains the eclipse platform, sdk, rcp installed as a plugin (attached =
screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under development. =
So, are you saying that you are using UML2 2.0 with Eclipse 3.2 and EMF =
2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to confirm =
which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF 2.2.

How should I check the configuration? The exact same code and the =
libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a workbench. =
Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to see =
references to UML2Package or UML2Resource in code based on the latest =
API (they were replaced with UMLPackage and UMLResource as of UML2 =
2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model and a =
profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a plugin =
context or not?

public static String verifyModel(String metaModelFile) throws =
IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, resourceSet);
}

public static Model loadModel(String modelFile, ResourceSet =
resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_0021_01C73E03.A0EF74A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 as =
2.2.0.1... did=20
you mean 2.0.1? If so, you should see =
org.eclipse.uml2_2.0.1.v200609210850.jar=20
and org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the=20
EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must be a =
problem=20
with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2 with EMF=20
2.2.1 and UML 2.2.0.1, however since my application was previously =
running=20
using org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar,=20
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar,=20
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my=20
current configuration only contains the eclipse platform, sdk, rcp =
installed=20
as a plugin (attached screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create a =
project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system hangs =
when I make an=20
API call to these jars. In the attached code, the system hangs in=20
NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise on =
how to resolve=20
this and load the model and the profile from within a plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks for =
your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2 2.1=20
is still under development. So, are you saying that you are using =
UML2 2.0=20
with Eclipse 3.2 and EMF 2.2? I'd suggest selecting the 'Help &gt; =
About=20
Eclipse SDK' to confirm which versions of the UML2 plug-ins are=20
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in the =
platform=20
log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am using UML =
2.1 and not=20
UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How should I =
check the=20
configuration? The exact same code and the libraries work fine in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works stand-alone =
should also=20
work in a workbench. Are you seeing any exceptions in the =
platform=20
log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are using UML2 =
2.x? I=20
wouldn't expect to see references to UML2Package or UML2Resource =
in code=20
based on the latest API (they were replaced with UMLPackage and=20
UMLResource as of UML2 2.0)... Could there be a problem with =
your=20
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =

message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am trying =
to use the=20
following code to open a model and a profile in an eclipse =
plugin=20
using the UML 2.1 API libraries. </FONT><FONT face=3DCourier=20
color=3D#000080 size=3D2>The libraries are added in the =
plugin.xml -&gt;=20
Runtime -&gt; Classpath tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code to=20
load a model, profile and check if profile is applied on model =

elements works fine in regular java i.e. non plugin =
evironment, but=20
when I try to do this from within a plugin, the system hangs =
after=20
ResourceSet resourceSet =3D new =
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Should the =
code change=20
depending on whether its in a plugin context or =
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>public =
static String=20
verifyModel(String metaModelFile) throws IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp; String=20
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; Resource =
resource=20
=3D resourceSet.getResource(uri, true);<BR>&nbsp;&nbsp;&nbsp; =
Model=20
model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile profile =3D =
null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch =
(IOException=20
exception) {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; while=20
(iterator.hasNext()) =
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
Object currentObject =3D=20
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
if=20
(currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0021_01C73E03.A0EF74A0--
Re: Difficulty with profile API [message #572942 is a reply to message #468709] Mon, 22 January 2007 14:45 Go to previous message
Praveen is currently offline PraveenFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_004E_01C73E0A.1E9E89D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within eclipse, I =
copied and referenced this jar from Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? If =
so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however =
since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF 2.2.

How should I check the configuration? The exact same code and =
the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to see =
references to UML2Package or UML2Resource in code based on the latest =
API (they were replaced with UMLPackage and UMLResource as of UML2 =
2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model and a =
profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a plugin =
context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, resourceSet);
}

public static Model loadModel(String modelFile, ResourceSet =
resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_004E_01C73E0A.1E9E89D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not want =
to use the UML2=20
plugin installed within eclipse, I copied and referenced this jar from=20
Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am not =
getting this=20
error for other libraries that I referenced the same way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure why =
this error is=20
coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 as =
2.2.0.1...=20
did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF=20
plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must be =
a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2 with=20
EMF 2.2.1 and UML 2.2.0.1, however since my application was =
previously=20
running using org.eclipse.uml2_1.1.0.jar, =
org.eclipse.uml2.common_1.1.0.jar,=20
org.eclipse.emf.ecore_2.1.0.jar, =
org.eclipse.emf.ecore.xmi_2.1.0.jar,=20
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above =
plugins. Now=20
my current configuration only contains the eclipse platform, sdk, =
rcp=20
installed as a plugin (attached screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create a =
project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system hangs =
when I make an=20
API call to these jars. In the attached code, the system hangs in=20
NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise on =
how to resolve=20
this and load the model and the profile from within a plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks for =
your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2 2.1=20
is still under development. So, are you saying that you are using =
UML2 2.0=20
with Eclipse 3.2 and EMF 2.2? I'd suggest selecting the 'Help &gt; =
About=20
Eclipse SDK' to confirm which versions of the UML2 plug-ins are=20
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in the =
platform=20
log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am using =
UML 2.1 and not=20
UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How should I =
check the=20
configuration? The exact same code and the libraries work fine =
in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone should=20
also work in a workbench. Are you seeing any exceptions in the =

platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are using =
UML2 2.x? I=20
wouldn't expect to see references to UML2Package or =
UML2Resource in=20
code based on the latest API (they were replaced with =
UMLPackage and=20
UMLResource as of UML2 2.0)... Could there be a problem with =
your=20
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
trying to use the=20
following code to open a model and a profile in an eclipse =
plugin=20
using the UML 2.1 API libraries. </FONT><FONT face=3DCourier =

color=3D#000080 size=3D2>The libraries are added in the =
plugin.xml -&gt;=20
Runtime -&gt; Classpath tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code to=20
load a model, profile and check if profile is applied on =
model=20
elements works fine in regular java i.e. non plugin =
evironment, but=20
when I try to do this from within a plugin, the system hangs =
after=20
ResourceSet resourceSet =3D new =
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Should =
the code change=20
depending on whether its in a plugin context or =
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>public =
static String=20
verifyModel(String metaModelFile) throws IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp;=20
String prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; Resource =

resource =3D resourceSet.getResource(uri, =
true);<BR>&nbsp;&nbsp;&nbsp;=20
Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile profile =3D =
null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch =
(IOException=20
exception) {<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; while=20
(iterator.hasNext()) =
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
Object currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if=20
(currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_004E_01C73E0A.1E9E89D0--
Re: Difficulty with profile API [message #572983 is a reply to message #468716] Mon, 22 January 2007 14:56 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C73E0B.93BF0400
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Praveen,

The UML2Package interface is obsolete in UML2 2.x - your application =
cannot use it if you want to run it in an Eclipse environment. You'll =
need to migrate your application code to use the new APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within eclipse, I =
copied and referenced this jar from Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? =
If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however =
since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF =
2.2.

How should I check the configuration? The exact same code and =
the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to =
see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model and =
a profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_0008_01C73E0B.93BF0400
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is obsolete =
in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in an =
Eclipse=20
environment. You'll need to migrate your application code to use the new =

APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =
message=20
<A=20
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not want =
to use the=20
UML2 plugin installed within eclipse, I copied and referenced this jar =
from=20
Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am not =
getting this=20
error for other libraries that I referenced the same way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure why =
this error is=20
coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 as =
2.2.0.1...=20
did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the=20
EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must =
be a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2 with=20
EMF 2.2.1 and UML 2.2.0.1, however since my application was =
previously=20
running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I=20
disabled all of the above plugins. Now my current configuration =
only=20
contains the eclipse platform, sdk, rcp installed as a plugin =
(attached=20
screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create a =
project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system =
hangs when I make=20
an API call to these jars. In the attached code, the system hangs =
in=20
NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise =
on how to=20
resolve this and load the model and the profile from within a =
plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks for =
your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2=20
2.1 is still under development. So, are you saying that you are =
using=20
UML2 2.0 with Eclipse 3.2 and EMF 2.2? I'd suggest selecting the =
'Help=20
&gt; About Eclipse SDK' to confirm which versions of the UML2 =
plug-ins=20
are installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in =
the platform=20
log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =

message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am using =
UML 2.1 and=20
not UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How should =
I check the=20
configuration? The exact same code and the libraries work fine =
in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in=20
message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone should=20
also work in a workbench. Are you seeing any exceptions in =
the=20
platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are using =
UML2 2.x? I=20
wouldn't expect to see references to UML2Package or =
UML2Resource in=20
code based on the latest API (they were replaced with =
UMLPackage and=20
UMLResource as of UML2 2.0)... Could there be a problem with =
your=20
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
trying to use=20
the following code to open a model and a profile in an =
eclipse=20
plugin using the UML 2.1 API libraries. </FONT><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>The libraries are added in the =
plugin.xml=20
-&gt; Runtime -&gt; Classpath tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code to=20
load a model, profile and check if profile is applied on =
model=20
elements works fine in regular java i.e. non plugin =
evironment,=20
but when I try to do this from within a plugin, the system =
hangs=20
after ResourceSet resourceSet =3D new=20
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Should =
the code=20
change depending on whether its in a plugin context or=20
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>public =
static String=20
verifyModel(String metaModelFile) throws IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp;=20
String prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp; =

prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile =
profile =3D=20
null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; =
while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Object=20
currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if=20
(currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML >

------=_NextPart_000_0008_01C73E0B.93BF0400--
Re: Difficulty with profile API [message #573052 is a reply to message #468721] Mon, 22 January 2007 15:29 Go to previous message
Praveen is currently offline PraveenFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0085_01C73E10.32291320
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Kenn,

Thanks for your response.

I cannot modify the existing code as it is being shared by other =
resources.

Can I install uml2-1.1.1 on eclipse 3.2 with emf2.2.1?

If not, then what is a stable configuration for running uml2-1.1.1?

Regards Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2jap$hiq$1@utils.eclipse.org...
Praveen,

The UML2Package interface is obsolete in UML2 2.x - your application =
cannot use it if you want to run it in an Eclipse environment. You'll =
need to migrate your application code to use the new APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within eclipse, =
I copied and referenced this jar from Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean 2.0.1? =
If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar and =
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions of =
the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, however =
since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and the =
profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and EMF =
2.2.

How should I check the configuration? The exact same code =
and the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect to =
see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model =
and a profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check if =
profile is applied on model elements works fine in regular java i.e. non =
plugin evironment, but when I try to do this from within a plugin, the =
system hangs after ResourceSet resourceSet =3D new ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, resourceSet);
Model model =3D loadModel(metaModelFile, =
resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D =
inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_0085_01C73E10.32291320
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks for your=20
response.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I cannot modify the =
existing code=20
as it is being shared by other resources.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Can I install =
uml2-1.1.1 on eclipse=20
3.2 with emf2.2.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>If not, then what is =
a stable=20
configuration for running uml2-1.1.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Regards=20
Praveen.</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:ep2jap$hiq$1@utils.eclipse.org">news:ep2jap$hiq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is obsolete =
in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in an =
Eclipse=20
environment. You'll need to migrate your application code to use the =
new=20
APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not =
want to use the=20
UML2 plugin installed within eclipse, I copied and referenced this =
jar from=20
Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am =
not getting this=20
error for other libraries that I referenced the same =
way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure why =
this error is=20
coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of UML2 =
as=20
2.2.0.1... did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x =
versions of the=20
EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There must =
be a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am running =
eclipse 3.2=20
with EMF 2.2.1 and UML 2.2.0.1, however since my application was =

previously running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I=20
disabled all of the above plugins. Now my current configuration =
only=20
contains the eclipse platform, sdk, rcp installed as a plugin =
(attached=20
screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then create =
a project and=20
reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system =
hangs when I=20
make an API call to these jars. In the attached code, the system =
hangs=20
in NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =
=3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please advise =
on how to=20
resolve this and load the model and the profile from within a =
plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks =
for your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =
since&nbsp;UML2=20
2.1 is still under development. So, are you saying that you =
are using=20
UML2 2.0 with Eclipse 3.2 and EMF 2.2? I'd suggest selecting =
the 'Help=20
&gt; About Eclipse SDK' to confirm which versions of the UML2 =
plug-ins=20
are installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing in =
the=20
platform log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
using UML 2.1 and=20
not UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How =
should I check the=20
configuration? The exact same code and the libraries work =
fine in=20
standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone=20
should also work in a workbench. Are you seeing any =
exceptions in=20
the platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are =
using UML2 2.x?=20
I wouldn't expect to see references to UML2Package or =
UML2Resource=20
in code based on the latest API (they were replaced with=20
UMLPackage and UMLResource as of UML2 2.0)... Could there =
be a=20
problem with your configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
trying to use=20
the following code to open a model and a profile in an =
eclipse=20
plugin using the UML 2.1 API libraries. </FONT><FONT=20
face=3DCourier color=3D#000080 size=3D2>The libraries =
are added in the=20
plugin.xml -&gt; Runtime -&gt; Classpath =
tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following code=20
to load a model, profile and check if profile is applied =
on=20
model elements works fine in regular java i.e. non =
plugin=20
evironment, but when I try to do this from within a =
plugin, the=20
system hangs after ResourceSet resourceSet =3D new=20
ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Should the code=20
change depending on whether its in a plugin context or=20
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>public static=20
String verifyModel(String metaModelFile) throws =
IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>&nbsp;&nbsp;&nbsp;=20
String =
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D =
loadProfile(prflPath,=20
resourceSet);<BR>&nbsp;&nbsp;&nbsp; Model model =3D=20
loadModel(metaModelFile, resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =
ResourceSet=20
resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String modelFile, =

ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; Profile =
profile=20
=3D null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; =
}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; =
while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Object=20
currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
if (currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BODY></HTM=
L>

------=_NextPart_000_0085_01C73E10.32291320--
Re: Difficulty with profile API [message #573115 is a reply to message #468732] Mon, 22 January 2007 16:13 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_001B_01C73E16.56D041C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Praveen,

No, you cannot use UML2 1.1.1 with Eclipse 3.2 and EMF 2.2.1. You'll =
need Eclipse 3.1.x and EMF 2.1.x.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2l90$84a$1@utils.eclipse.org...
Hi Kenn,

Thanks for your response.

I cannot modify the existing code as it is being shared by other =
resources.

Can I install uml2-1.1.1 on eclipse 3.2 with emf2.2.1?

If not, then what is a stable configuration for running uml2-1.1.1?

Regards Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2jap$hiq$1@utils.eclipse.org...
Praveen,

The UML2Package interface is obsolete in UML2 2.x - your application =
cannot use it if you want to run it in an Eclipse environment. You'll =
need to migrate your application code to use the new APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in =
org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within =
eclipse, I copied and referenced this jar from =
Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean =
2.0.1? If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar =
and org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, =
however since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In the =
attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and =
the profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and =
EMF 2.2.

How should I check the configuration? The exact same code =
and the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect =
to see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a model =
and a profile in an eclipse plugin using the UML 2.1 API libraries. The =
libraries are added in the plugin.xml -> Runtime -> Classpath tab.

The following code to load a model, profile and check =
if profile is applied on model elements works fine in regular java i.e. =
non plugin evironment, but when I try to do this from within a plugin, =
the system hangs after ResourceSet resourceSet =3D new =
ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String metaModelFile) =
throws IOException {
ResourceSet resourceSet =3D new ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, =
resourceSet);
Model model =3D loadModel(metaModelFile, =
resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D resourceSet.getResource(uri, =
true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D =
inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_001B_01C73E16.56D041C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.3020" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, you cannot use UML2 1.1.1 with =
Eclipse 3.2 and=20
EMF 2.2.1. You'll need Eclipse 3.1.x and EMF 2.1.x.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2l90$84a$1@utils.eclipse.org">news:ep2l90$84a$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks for your=20
response.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I cannot modify the =
existing code=20
as it is being shared by other resources.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Can I install =
uml2-1.1.1 on=20
eclipse 3.2 with emf2.2.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>If not, then what =
is a stable=20
configuration for running uml2-1.1.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Regards=20
Praveen.</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote =
in message=20
<A=20
=
href=3D"news:ep2jap$hiq$1@utils.eclipse.org">news:ep2jap$hiq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is =
obsolete in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in =
an=20
Eclipse environment. You'll need to migrate your application code to =
use the=20
new APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package is=20
contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do not =
want to use=20
the UML2 plugin installed within eclipse, I copied and referenced =
this jar=20
from Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly am =
not getting=20
this error for other libraries that I referenced the same=20
way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure =
why this error=20
is coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks =
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of =
UML2 as=20
2.2.0.1... did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x =
versions of=20
the EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There =
must be a=20
problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote in =

message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked=20
eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
running eclipse 3.2=20
with EMF 2.2.1 and UML 2.2.0.1, however since my application =
was=20
previously running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar.=20
I disabled all of the above plugins. Now my current =
configuration only=20
contains the eclipse platform, sdk, rcp installed as a plugin=20
(attached screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then =
create a project=20
and reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The system =
hangs when I=20
make an API call to these jars. In the attached code, the =
system hangs=20
in NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String str =
=3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please =
advise on how to=20
resolve this and load the model and the profile from within a =
plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many thanks =
for your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in=20
message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet,=20
since&nbsp;UML2 2.1 is still under development. So, are you =
saying=20
that you are using UML2 2.0 with Eclipse 3.2 and EMF 2.2? =
I'd=20
suggest selecting the 'Help &gt; About Eclipse SDK' to =
confirm which=20
versions of the UML2 plug-ins are installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are appearing =
in the=20
platform log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
using UML 2.1=20
and not UML 2.2 with eclipse 3.2 and EMF 2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How =
should I check=20
the configuration? The exact same code and the libraries =
work fine=20
in standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone=20
should also work in a workbench. Are you seeing any =
exceptions=20
in the platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are =
using UML2=20
2.x? I wouldn't expect to see references to UML2Package =
or=20
UML2Resource in code based on the latest API (they were =
replaced=20
with UMLPackage and UMLResource as of UML2 2.0)... Could =
there=20
be a problem with your configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I =
am trying to=20
use the following code to open a model and a profile =
in an=20
eclipse plugin using the UML 2.1 API libraries. =
</FONT><FONT=20
face=3DCourier color=3D#000080 size=3D2>The libraries =
are added in=20
the plugin.xml -&gt; Runtime -&gt; Classpath =
tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
following=20
code to load a model, profile and check if profile is =
applied=20
on model elements works fine in regular java i.e. non =
plugin=20
evironment, but when I try to do this from within a =
plugin,=20
the system hangs after ResourceSet resourceSet =3D new =

ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Should the code=20
change depending on whether its in a plugin context or =

not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>public static=20
String verifyModel(String metaModelFile) throws =
IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D =
new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2>&nbsp;&nbsp;&nbsp; String=20
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT =
face=3DCourier=20
color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D=20
loadProfile(prflPath, =
resourceSet);<BR>&nbsp;&nbsp;&nbsp;=20
Model model =3D loadModel(metaModelFile,=20
resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI =
uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model)=20
=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String =
modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; =
Profile=20
profile =3D null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } =
catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; =
}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; =
while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Object =

currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
if (currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; return =

=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE=
></BODY></HTML>

------=_NextPart_000_001B_01C73E16.56D041C0--
Re: Difficulty with profile API [message #573156 is a reply to message #468735] Mon, 22 January 2007 18:06 Go to previous message
Praveen is currently offline PraveenFriend
Messages: 9
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_00EF_01C73E26.1257C5D0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Kenn,

I setup eclipse 3.1 with emf 2.2.1 and uml2 1.1.1 and it nicely solved =
all my problems.

Thanks again Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2nr7$ec0$1@utils.eclipse.org...
Praveen,

No, you cannot use UML2 1.1.1 with Eclipse 3.2 and EMF 2.2.1. You'll =
need Eclipse 3.1.x and EMF 2.1.x.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2l90$84a$1@utils.eclipse.org...
Hi Kenn,

Thanks for your response.

I cannot modify the existing code as it is being shared by other =
resources.

Can I install uml2-1.1.1 on eclipse 3.2 with emf2.2.1?

If not, then what is a stable configuration for running uml2-1.1.1?

Regards Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2jap$hiq$1@utils.eclipse.org...
Praveen,

The UML2Package interface is obsolete in UML2 2.x - your =
application cannot use it if you want to run it in an Eclipse =
environment. You'll need to migrate your application code to use the new =
APIs.

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep2ine$orc$1@utils.eclipse.org...
Aha,

!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/uml2/UML2Package

The interface UML2Package is contained in =
org.eclipse.uml2_1.1.0.jar

Since I do not want to use the UML2 plugin installed within =
eclipse, I copied and referenced this jar from =
Plugin.xml->Runtime->ClassPath.

I certainly am not getting this error for other libraries that I =
referenced the same way.

I am not sure why this error is coming for this particular jar.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:ep2g02$qo9$1@utils.eclipse.org...
Praveen,

There is no such version of UML2 as 2.2.0.1... did you mean =
2.0.1? If so, you should see org.eclipse.uml2_2.0.1.v200609210850.jar =
and org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x versions =
of the EMF plug-ins). Please, if there are exceptions in the log =
(<workspace>/.metadata/.log) could you post them? There must be a =
problem with your configuration...

Kenn

"Praveen" <jpk4077@hotmail.com> wrote in message =
news:ep1it8$e6k$1@utils.eclipse.org...
Hi Kenn,

I checked eclipse->help->about.=20

I am running eclipse 3.2 with EMF 2.2.1 and UML 2.2.0.1, =
however since my application was previously running using =
org.eclipse.uml2_1.1.0.jar, org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar, org.eclipse.emf.ecore.xmi_2.1.0.jar, =
org.eclipse.emf.common_2.1.0.jar. I disabled all of the above plugins. =
Now my current configuration only contains the eclipse platform, sdk, =
rcp installed as a plugin (attached screenshot).

I then create a project and reference these jar files in the =
plugin.xml->Runtime->ClassPath

The system hangs when I make an API call to these jars. In =
the attached code, the system hangs in NewAction.java -> run method()

String str =3D Utils.generateModelText(location);

Please advise on how to resolve this and load the model and =
the profile from within a plugin code.

Many thanks for your support,

Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:eo0694$32d$1@utils.eclipse.org...
Praveen,

There is no UML2 2.2 yet, since UML2 2.1 is still under =
development. So, are you saying that you are using UML2 2.0 with Eclipse =
3.2 and EMF 2.2? I'd suggest selecting the 'Help > About Eclipse SDK' to =
confirm which versions of the UML2 plug-ins are installed.

So no errors are appearing in the platform log?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:env0qh$dn$1@utils.eclipse.org...
Hi Kenn,

I am using UML 2.1 and not UML 2.2 with eclipse 3.2 and =
EMF 2.2.

How should I check the configuration? The exact same =
code and the libraries work fine in standalone java programs.

Thanks Praveen.
"Kenn Hussey" <khussey@ca.ibm.com> wrote in message =
news:enma4r$92u$1@utils.eclipse.org...
Praveen,

No, code that works stand-alone should also work in a =
workbench. Are you seeing any exceptions in the platform log?

Are you sure you are using UML2 2.x? I wouldn't expect =
to see references to UML2Package or UML2Resource in code based on the =
latest API (they were replaced with UMLPackage and UMLResource as of =
UML2 2.0)... Could there be a problem with your configuration?

Kenn
"Praveen" <jpk4077@hotmail.com> wrote in message =
news:enk2fa$pck$1@utils.eclipse.org...
Hi,

I am trying to use the following code to open a =
model and a profile in an eclipse plugin using the UML 2.1 API =
libraries. The libraries are added in the plugin.xml -> Runtime -> =
Classpath tab.

The following code to load a model, profile and =
check if profile is applied on model elements works fine in regular java =
i.e. non plugin evironment, but when I try to do this from within a =
plugin, the system hangs after ResourceSet resourceSet =3D new =
ResourceSetImpl();

Should the code change depending on whether its in a =
plugin context or not?

public static String verifyModel(String =
metaModelFile) throws IOException {
ResourceSet resourceSet =3D new =
ResourceSetImpl();
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);
Map extensionToFactoryMap =3D =
resourceSet.getResourceFactoryRegistry()
.getExtensionToFactoryMap();
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);
URL prflURL =3D =
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));
String prflPath=3DprflURL.getFile();
prflPath=3DprflPath.substring(1);

Profile prfl =3D loadProfile(prflPath, =
resourceSet);
Model model =3D loadModel(metaModelFile, =
resourceSet);
}

public static Model loadModel(String modelFile, =
ResourceSet resourceSet) {
URI uri =3D URI.createFileURI(modelFile);
Resource resource =3D =
resourceSet.getResource(uri, true);
Model model =3D (Model) =
EcoreUtil.getObjectByType(resource.getContents(),
UML2Package.eINSTANCE.getModel());

return model;
}

public static Profile loadProfile(String modelFile, =
ResourceSet resourceSet) {
Profile profile =3D null;

Resource inputResource =3D =
resourceSet.createResource(URI
.createFileURI(modelFile));
try {
inputResource.load(null);
} catch (IOException exception) {
exception.printStackTrace();
}

Iterator iterator =3D =
inputResource.getAllContents();
while (iterator.hasNext()) {
Object currentObject =3D iterator.next();
if (currentObject instanceof Profile) {
profile =3D (Profile) currentObject;
break;
}
}
return profile;
}

------=_NextPart_000_00EF_01C73E26.1257C5D0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I setup eclipse 3.1 =
with emf 2.2.1=20
and uml2 1.1.1 and it nicely solved all my problems.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks again =
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote in =
message=20
<A=20
=
href=3D"news:ep2nr7$ec0$1@utils.eclipse.org">news:ep2nr7$ec0$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, you cannot use UML2 1.1.1 with =
Eclipse 3.2=20
and EMF 2.2.1. You'll need Eclipse 3.1.x and EMF 2.1.x.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2l90$84a$1@utils.eclipse.org">news:ep2l90$84a$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks for your=20
response.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I cannot modify =
the existing=20
code as it is being shared by other resources.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Can I install =
uml2-1.1.1 on=20
eclipse 3.2 with emf2.2.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>If not, then what =
is a stable=20
configuration for running uml2-1.1.1?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Regards=20
Praveen.</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2jap$hiq$1@utils.eclipse.org">news:ep2jap$hiq$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The UML2Package interface is =
obsolete in UML2=20
2.x&nbsp;- your application cannot use it if you want to run it in =
an=20
Eclipse environment. You'll need to migrate your application code =
to use=20
the new APIs.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV>"Praveen" &lt;<A=20
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2ine$orc$1@utils.eclipse.org">news:ep2ine$orc$1@utils.ecli=
pse.org</A>...</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Aha,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>!STACK=20
0<BR>java.lang.NoClassDefFoundError:=20
org/eclipse/uml2/UML2Package<BR></FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The interface =
UML2Package=20
is contained in org.eclipse.uml2_1.1.0.jar</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Since I do =
not want to use=20
the UML2 plugin installed within eclipse, I copied and =
referenced this=20
jar from Plugin.xml-&gt;Runtime-&gt;ClassPath.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I certainly =
am not getting=20
this error for other libraries that I referenced the same=20
way.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am not sure =
why this=20
error is coming for this particular jar.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Thanks=20
Praveen.</DIV></FONT>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:ep2g02$qo9$1@utils.eclipse.org">news:ep2g02$qo9$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no such version of =
UML2 as=20
2.2.0.1... did you mean 2.0.1? If so, you should see=20
org.eclipse.uml2_2.0.1.v200609210850.jar and=20
org.eclipse.uml2.common_1.2.1.v200609210850.jar (and 2.2.x =
versions of=20
the EMF plug-ins). Please, if there are exceptions in the log=20
(&lt;workspace&gt;/.metadata/.log) could you post them? There =
must be=20
a problem with your configuration...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:ep1it8$e6k$1@utils.eclipse.org">news:ep1it8$e6k$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi =
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I checked =

eclipse-&gt;help-&gt;about. </FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
running eclipse=20
3.2 with EMF 2.2.1 and UML 2.2.0.1, however since my =
application was=20
previously running using org.eclipse.uml2_1.1.0.jar,=20
org.eclipse.uml2.common_1.1.0.jar, =
org.eclipse.emf.ecore_2.1.0.jar,=20
org.eclipse.emf.ecore.xmi_2.1.0.jar,=20
org.eclipse.emf.common_2.1.0.jar. I disabled all of the =
above=20
plugins. Now my current configuration only contains the =
eclipse=20
platform, sdk, rcp installed as a plugin (attached=20
screenshot).</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I then =
create a project=20
and reference these jar files in the=20
plugin.xml-&gt;Runtime-&gt;ClassPath</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>The =
system hangs when I=20
make an API call to these jars. In the attached code, the =
system=20
hangs in NewAction.java -&gt; run method()</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>String =
str =3D=20
Utils.generateModelText(location);</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Please =
advise on how to=20
resolve this and load the model and the profile from within =
a plugin=20
code.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Many =
thanks for your=20
support,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt; wrote=20
in message <A=20
=
href=3D"news:eo0694$32d$1@utils.eclipse.org">news:eo0694$32d$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There is no UML2 2.2 yet, =

since&nbsp;UML2 2.1 is still under development. So, are =
you saying=20
that you are using UML2 2.0 with Eclipse 3.2 and EMF 2.2? =
I'd=20
suggest selecting the 'Help &gt; About Eclipse SDK' to =
confirm=20
which versions of the UML2 plug-ins are =
installed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So no errors are =
appearing in the=20
platform log?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:env0qh$dn$1@utils.eclipse.org">news:env0qh$dn$1@utils.eclips=
e.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>Hi=20
Kenn,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I am =
using UML 2.1=20
and not UML 2.2 with eclipse 3.2 and EMF =
2.2.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>How =
should I check=20
the configuration? The exact same code and the libraries =
work=20
fine in standalone java programs.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Thanks=20
Praveen.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kenn Hussey" &lt;<A=20
=
href=3D"mailto:khussey@ca.ibm.com">khussey@ca.ibm.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enma4r$92u$1@utils.eclipse.org">news:enma4r$92u$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Praveen,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>No, code that works =
stand-alone=20
should also work in a workbench. Are you seeing any =
exceptions=20
in the platform log?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Are you sure you are =
using UML2=20
2.x? I wouldn't expect to see references to =
UML2Package or=20
UML2Resource in code based on the latest API (they =
were=20
replaced with UMLPackage and UMLResource as of UML2 =
2.0)...=20
Could there be a problem with your =
configuration?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Kenn</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; =
MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Praveen" &lt;<A=20
=
href=3D"mailto:jpk4077@hotmail.com">jpk4077@hotmail.com</A>&gt;=20
wrote in message <A=20
=
href=3D"news:enk2fa$pck$1@utils.eclipse.org">news:enk2fa$pck$1@utils.ecli=
pse.org</A>...</DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 size=3D2>I =
am trying to=20
use the following code to open a model and a profile =
in an=20
eclipse plugin using the UML 2.1 API libraries. =
</FONT><FONT=20
face=3DCourier color=3D#000080 size=3D2>The =
libraries are added in=20
the plugin.xml -&gt; Runtime -&gt; Classpath=20
tab.</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>The following=20
code to load a model, profile and check if profile =
is=20
applied on model elements works fine in regular java =
i.e.=20
non plugin evironment, but when I try to do this =
from within=20
a plugin, the system hangs after ResourceSet =
resourceSet =3D=20
new ResourceSetImpl();</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>Should the code=20
change depending on whether its in a plugin context =
or=20
not?</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier color=3D#000080 =
size=3D2>public static=20
String verifyModel(String metaModelFile) throws =
IOException=20
{<BR>&nbsp;&nbsp;&nbsp; ResourceSet resourceSet =3D =
new=20
ResourceSetImpl();<BR>&nbsp;&nbsp;&nbsp;=20
=
resourceSet.getPackageRegistry().put(UML2Package.eNS_URI,UML 2Package.eINS=
TANCE);<BR>&nbsp;&nbsp;&nbsp;=20
Map extensionToFactoryMap =3D=20
=
resourceSet.getResourceFactoryRegistry()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=20
.getExtensionToFactoryMap();<BR>&nbsp;&nbsp;&nbsp;=20
=
extensionToFactoryMap.put(UML2Resource.FILE_EXTENSION,UML2Re source.Factor=
y.INSTANCE);<BR>&nbsp;&nbsp;&nbsp;=20
URL prflURL =3D=20
=
FileLocator.resolve(Platform.getBundle("UCSIM").getResource( "resources/Pr=
ofile.uml2"));</FONT></DIV>
<DIV><FONT face=3DCourier color=3D#000080=20
size=3D2>&nbsp;&nbsp;&nbsp; String=20
prflPath=3DprflURL.getFile();<BR>&nbsp;&nbsp;&nbsp;=20
prflPath=3DprflPath.substring(1);</FONT></DIV><FONT=20
face=3DCourier color=3D#000080 size=3D2>
<DIV><BR>&nbsp;&nbsp;&nbsp; Profile prfl =3D=20
loadProfile(prflPath, =
resourceSet);<BR>&nbsp;&nbsp;&nbsp;=20
Model model =3D loadModel(metaModelFile,=20
resourceSet);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Model loadModel(String modelFile, =

ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; URI =
uri =3D=20
URI.createFileURI(modelFile);<BR>&nbsp;&nbsp;&nbsp; =
Resource=20
resource =3D resourceSet.getResource(uri,=20
true);<BR>&nbsp;&nbsp;&nbsp; Model model =3D (Model) =

=
EcoreUtil.getObjectByType(resource.getContents(),<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;=20
UML2Package.eINSTANCE.getModel());</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; return model;<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>public static Profile loadProfile(String =
modelFile,=20
ResourceSet resourceSet) {<BR>&nbsp;&nbsp;&nbsp; =
Profile=20
profile =3D null;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Resource inputResource =3D=20
=
resourceSet.createResource(URI<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
.createFileURI(modelFile));<BR>&nbsp;&nbsp;&nbsp; =
try=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
inputResource.load(null);<BR>&nbsp;&nbsp;&nbsp; } =
catch=20
(IOException exception)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
exception.printStackTrace();<BR>&nbsp;&nbsp;&nbsp; =
}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Iterator iterator =3D=20
=
inputResource.getAllContents();<BR>&nbsp;&nbsp;&nbsp; while=20
(iterator.hasNext())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
Object=20
currentObject =3D=20
=
iterator.next();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
if (currentObject instanceof Profile)=20
=
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
profile =3D (Profile)=20
=
currentObject;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;=20
break;<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =

}<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; =
return=20
=
profile;<BR>}<BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE></BL=
OCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE ></BLOCKQUOTE=
></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00EF_01C73E26.1257C5D0--
Previous Topic:Re: Difficulty with profile API
Next Topic:Overview Diagram of UML2
Goto Forum:
  


Current Time: Tue Apr 16 15:10:07 GMT 2024

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

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

Back to the top