Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Today's Messages (on)  | Unanswered Messages (off)

Forum: Test
 Topic: Something cool
Re: Something cool [message #1413429 is a reply to message #1412198] Thu, 28 August 2014 09:47
Denis Roy is currently offline Denis Roy
Messages: 305
Registered: October 2004
Location: Ottawa, Ontario, Canada
Senior Member

Another test.

Denis Roy
Eclipse Webmaster -- webmaster@eclipse.org
Forum: Lyo
 Topic: Sample Creating OSLC Link via Browser? (302 Response)
Re: Sample Creating OSLC Link via Browser? (302 Response) [message #1413430 is a reply to message #1412249] Thu, 28 August 2014 09:49
Steve Speicher is currently offline Steve Speicher
Messages: 84
Registered: July 2009
Member

I don't have much experience with DOORS, though I do know that typically a browser will follow the 302 with a subsequent GET. You may get around this by first doing a GET (or HEAD) request and get the URL from the "Location:" header, then perform the PUT on that URL.
Forum: TMF (Xtext)
 Topic: code generation using xtend
Re: code generation using xtend [message #1413224 is a reply to message #1412813] Thu, 28 August 2014 01:12
kim younghyun is currently offline kim younghyun
Messages: 4
Registered: August 2014
Junior Member
Thank you for your concern.

I'm going to make a file using xtext's generator.

first, test.hpp ( implemented by ENTITY/ATTRIBUTE )
second, test.cpp ( other part (except entity rule) )

the other part is
copy to test.cpp from my_script except for ENTITY/ATTRIBUTE.

How can I make copy code that using xtend? (I don't know how to apply recursive rule in Xtend)

I'm beginner xtend, I don't know how to use resource.

Pls advice me more.

bye.

Re: code generation using xtend [message #1413260 is a reply to message #1413224] Thu, 28 August 2014 03:06
Christian Dietrich is currently offline Christian Dietrich
Messages: 6230
Registered: July 2009
Senior Member
Hi,

i cannot help you write your xtend code.
if you cannot cope with xtend then write the code in java and call the java code from xtend.

method calls and recursions work in xtend as they work in java.

you can find the xtend documentation here /xtend/documentation.html


 Topic: Errors while running Xtext Junit from command line
Errors while running Xtext Junit from command line [message #1413361] Thu, 28 August 2014 07:03
Kunal Khaware is currently offline Kunal Khaware
Messages: 26
Registered: December 2013
Junior Member

Hi,
I have written a DSL and added Junit test case using Xtext Junit by injecting AdInjectorProvider .

When I run from eclipse I am able to run the Test case , but if I run from command line by adding all the required jars in classpath, it gives below error:
 1) No implementation for javax.inject.Provider<org.eclipse.emf.ecore.resource.ResourceSet> was bound.
     [java]   while locating javax.inject.Provider<org.eclipse.emf.ecore.resource.ResourceSet>
     [java]     for field at com.mydsl.TestMyDsl.resourceSet(TestMyDsl.java:48)
     [java]   while locating com.mydsl.TestMyDsl


Any Help is really Appreciated.

Cheers
Kunal

[Updated on: Thu, 28 August 2014 07:05]

Report message to a moderator

 Topic: Getting an IXtextDocument without open editor
Re: Getting an IXtextDocument without open editor [message #1413262 is a reply to message #1413082] Thu, 28 August 2014 03:07
Christian Dietrich is currently offline Christian Dietrich
Messages: 6230
Registered: July 2009
Senior Member
Hi,

can you be a bit more specific: what do you want to do with the files? do you actually need a xtext document or is the resource ok
Re: Getting an IXtextDocument without open editor [message #1413268 is a reply to message #1413262] Thu, 28 August 2014 03:15
Daniel K. is currently offline Daniel K.
Messages: 3
Registered: August 2014
Junior Member
Hi,
a normal Resource I can get using the ResourceSet...
As most of the code uses the xtext document it would be fine to be able to retrieve such one only using a URI or something similar.
The code I'm talking about is already existent and is performing some actions on it, mainly from commands.
We want to automate this.

Regards
Daniel
Re: Getting an IXtextDocument without open editor [message #1413295 is a reply to message #1413268] Thu, 28 August 2014 04:25
Christian Dietrich is currently offline Christian Dietrich
Messages: 6230
Registered: July 2009
Senior Member
hmm then i fear i have no idea on this
Re: Getting an IXtextDocument without open editor [message #1413329 is a reply to message #1413295] Thu, 28 August 2014 05:34
Uli Merkel is currently offline Uli Merkel
Messages: 122
Registered: June 2013
Senior Member
Hi Daniel, Christian.

IIRC,somewhere in this forum there was some info
about starting the generator from the context menue without saving the file before.

Perhaps this may give you some inspiration how to start your processing.

[Updated on: Thu, 28 August 2014 05:34]

Report message to a moderator

Re: Getting an IXtextDocument without open editor [message #1413342 is a reply to message #1413329] Thu, 28 August 2014 06:00
Christian Dietrich is currently offline Christian Dietrich
Messages: 6230
Registered: July 2009
Senior Member
Yes this was my post, but i do not use any xtextdocument. this is why i asked it a document is required 100% and i interpreted Daniels Answer as Yes
Re: Getting an IXtextDocument without open editor [message #1413399 is a reply to message #1413342] Thu, 28 August 2014 08:37
Daniel K. is currently offline Daniel K.
Messages: 3
Registered: August 2014
Junior Member
Hi,
I will try it without the xtextdocument.
I will need to shift some of the functionality.
It is good to know then, not to relate to it in the functionality itself, if it is such a problem to retrieve an instance of it.
Thanks for your help.

Regards
Daniel
 Topic: Can Xtext support System Verilog
icon5.gif  Can Xtext support System Verilog [message #1413418] Thu, 28 August 2014 09:17
Shereen Hussein is currently offline Shereen Hussein
Messages: 1
Registered: August 2014
Junior Member
Hello everyone,
I am an newbie to Xtext and would like to use it for writing System Verilog. Can Xtext grammar support System Verilog? if Yes, What can be the limitations for writing system verilog? If No, can you please explain why it can't.

Thanks,
 Topic: Default structure for new dsl file
Re: Default structure for new dsl file [message #1413422 is a reply to message #1413105] Thu, 28 August 2014 09:23
Christian Dietrich is currently offline Christian Dietrich
Messages: 6230
Registered: July 2009
Senior Member
Hi you consider custom new file wizard?
 Topic: JVM Crash with Cross-References
icon4.gif  JVM Crash with Cross-References [message #1413432] Thu, 28 August 2014 09:51
Marc Schlegel is currently offline Marc Schlegel
Messages: 37
Registered: July 2009
Member
Hello everyone,

After reading the quite good xtext-documentation I managed to introduce classpath-scoped cross-references in my DSL.

However, since I added cross-references my DSL-IDE crashes with a JVMDump when I exit. The IDE is configured with only my DSL and the JDT-tooling.

Unhandled exception
Type=Segmentation error vmState=0x00000000
Windows_ExceptionCode=c0000005 J9Generic_Signal=00000004 ExceptionAddress=00000000772A31D0 ContextFlags=0010005f
Handler1=000007FFFF67D280 Handler2=000007FFFF64DEA0
RDI=0000000000000000 RSI=0000000000000000 RAX=00000000005FED28 RBX=000000000ABEEAB0
RCX=0000000000000000 RDX=0000000000000000 R8=0000000011D4F2A0 R9=0000000000008000
R10=0000000000000000 R11=0000000000200286 R12=0000000077382550 R13=0000000000000000 R14=000000000000FFFF R15=00000000772A9FC0
RIP=00000000772A31D0 RSP=00000000005FECB0 RBP=0000000000000000 GS=002B
FS=0053 ES=002B DS=002B
XMM0 000000000000027f (f: 639.000000, d: 3.157079e-321)
XMM1 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM2 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM3 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM4 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM5 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM6 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM7 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM8 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM9 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM10 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM11 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM12 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM13 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM14 0000000000000000 (f: 0.000000, d: 0.000000e+000)
XMM15 0000000000000000 (f: 0.000000, d: 0.000000e+000) Module=C:\Windows\SYSTEM32\ntdll.dll
Module_base_address=0000000077250000 Offset_in_DLL=00000000000531d0
Target=2_40_20110726_087724 (Windows 7 6.1 build 7601 Service Pack 1)
CPU=amd64 (8 logical CPUs) (0x3fd106000 RAM)
----------- Stack Backtrace -----------
---------------------------------------
JVMDUMP006I Speicherauszugsereignis "gpf", Detail "" wird verarbeitet - bitte warten.
JVMDUMP032I JVM forderte als Antwort auf ein Ereignis einen Speicherauszug von System mit "C:\Program Files\Eclipse Xtext\core.20140828.151009.1476.0001.dmp" an JVMDUMP030W Speicherauszug kann nicht in Datei C:\Program Files\Eclipse Xtext\core.20140828.151009.1476.0001.dmp geschrieben werden: (5) Zugriff verweigert


This happens now every time I exit the IDE. No Exceptions occur before. Did I miss some JVM-paramter which is necessary when using cross-references (permgen comes to mind)?

Thanks
Forum: SWTBot
 Topic: How to handle unpredictable shells
How to handle unpredictable shells [message #1413238] Thu, 28 August 2014 02:03
Shwetali Dhumal is currently offline Shwetali Dhumal
Messages: 2
Registered: August 2014
Junior Member
Hi,

In my RCP Application, sometimes some shell are opening on some conditions and i want to handle them.
for example: Overwrite shell will open if file is already exist in folder.I want to work on Overwrite shell if it would open.

I have tried if condition with shell is active,see code. But if condition is not working in swtbot. It is trying to click on Ok button which is on Overwrite shell even if overwrite shell is not opening.

See code:

If(swtBot.shell("Overwrite").isActive){

swtBot.Button("Ok").click(); //This code is every time executing even if Overwrite shell is not opened.
}else{

//doing some other operation
}
 Topic: wait until some condition
wait until some condition [message #1413237] Thu, 28 August 2014 02:03
Aparajita K is currently offline Aparajita K
Messages: 1
Registered: August 2014
Junior Member
Hi,

I am trying to add dynamic wait after clicking on finish till the progress bar disappears to create the project. But SwtBot cannot get the focus on the progress bar shell, it is focusing on the Aut main wizard. Can any body suggest how to add wait condition to wait until progress bar disappears.
Re: wait until some condition [message #1413445 is a reply to message #1413237] Thu, 28 August 2014 10:28
Mickael Istria is currently offline Mickael Istria
Messages: 745
Registered: July 2009
Location: Grenoble, France
Senior Member
bot.waitUntil(new ICondition() {
@Override
public boolean test() {
return bot.activeShell().getTitle().equals("Progress Information");
}
}


HTH
--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Forum: e(fx)clipse
 Topic: CleanUpAddon and DndAddon
Re: CleanUpAddon and DndAddon [message #1413299 is a reply to message #1413052] Thu, 28 August 2014 04:34
Bastien Bart is currently offline Bastien Bart
Messages: 7
Registered: May 2014
Junior Member
First bug : https://bugs.eclipse.org/bugs/show_bug.cgi?id=442766

Second bug : https://bugs.eclipse.org/bugs/show_bug.cgi?id=442767

The drag to the empty stack tagged with "NoAutoCollapse" is working fine.
I can't drag to an other empty stack (not tagged) but it's probably a side effect of the first bug.

Bastien
 Topic: Install on IBM Rational Application Developer for WebSphere 9.1.0.1
Re: Install on IBM Rational Application Developer for WebSphere 9.1.0.1 [message #1413414 is a reply to message #1413120] Thu, 28 August 2014 09:13
Thomas Schindl is currently offline Thomas Schindl
Messages: 5294
Registered: July 2009
Senior Member
What version of Eclipse SDK is the IBM product based on? 1.0.0 will most
likely only install into Luna (and even it it would install in an older
Eclipse version it might not be functional!) and 0.9.0 into Kepler.

Tom

On 28.08.14 14:18, Alex Rasmussen wrote:
> Hello all,
>
> I am trying to install e(fx)clipse on IBM RAD 9.1.0.1, but I'm
> constantly bumping into missing requirement errors.
>
> I have tried both version 1.0.0 and 0.9.0, but to no avail.
>
> And yes, I have added the Xtext repo as well.
>
> Has anyone had any success in installing on this platform?
>
> Thank you
Re: Install on IBM Rational Application Developer for WebSphere 9.1.0.1 [message #1413416 is a reply to message #1413414] Thu, 28 August 2014 09:17
Alex Rasmussen is currently offline Alex Rasmussen
Messages: 2
Registered: August 2014
Junior Member
It's Eclipse version 4.2.2.2

/Alex
Re: Install on IBM Rational Application Developer for WebSphere 9.1.0.1 [message #1413448 is a reply to message #1413416] Thu, 28 August 2014 10:37
Thomas Schindl is currently offline Thomas Schindl
Messages: 5294
Registered: July 2009
Senior Member
Hm ok that is Juno! 0.9.0 could work there (although it is totally
untested). What's the error p2 is giving you when trying to install?

Tom

On 28.08.14 15:17, Alex Rasmussen wrote:
> It's Eclipse version 4.2.2.2
>
> /Alex
Forum: NatTable
 Topic: Row selection Slow down in case of large data in NatTable
Row selection Slow down in case of large data in NatTable [message #1413385] Thu, 28 August 2014 08:02
Chetana Barhate is currently offline Chetana Barhate
Messages: 3
Registered: February 2014
Junior Member
Hi All,

We have migrated the JTable in to Nattable in our RCP application. All functionalities are working fine with NatTable but we are facing some problem related to Performance. In case of large data (around 10000 record), To select last row it takes around 4 to 5 sec. Loading the table is not taking time. If we try to select first row it takes milliseconds and if we scroll down to last row and try to select then its takes 5 seconds. Also to open the context menu it takes 4 to 5 sec.

Please help us for the above issue.
Thanks in advance.
Re: Row selection Slow down in case of large data in NatTable [message #1413453 is a reply to message #1413385] Thu, 28 August 2014 10:52
Dirk Fauth is currently offline Dirk Fauth
Messages: 1263
Registered: July 2012
Senior Member
That depends on your layer composition. Which layers are involved? If you check our examples and try the same in the "Everything but the kitchen sink" example, you will see that there is no such delay.

IIRC if you are using GlazedLists you should consider to use the GlazedListsDataProvider, as it has a special handling for the last row. Not sure if this is solving your issue.
Forum: EMF
 Topic: Custon type in <xs:list>
Re: Custon type in &lt;xs:list&gt; [message #1413252 is a reply to message #1410260] Thu, 28 August 2014 02:42
Gordan Vosicki is currently offline Gordan Vosicki
Messages: 5
Registered: March 2013
Junior Member
Thanks Ed for your proposal, this might be a solution.
Just a silly question:

As the XSD file has to be modified anyhow until there is a way to define additonal things (like ecore:type) outside the original file (like in JAXB), I could also simply replacee the xs:integer and xs:positiveInteger types by xs:int or xs:long.

Would the XML read/write functions still work if I made this simpler change ?

Another point:
These lists have potentially hundreds of thousands of elements.
I would prefer to use collection classes containing arrays of simple types instead of objects (int instead of Integer). We already have such classes, which actually implement java.util.List, and it would be easy to add support for EList.

Is there a more elegant way to do it than to modify by hand the generated factory methods ?
    public List<BigInteger> createFaceTypeFromString(EDataType eDataType, String initialValue);
    public String convertFaceTypeToString(EDataType eDataType, Object instanceValue);

Is there anything else which has to be done for this, I personally hate modifying generated code ?
Re: Custon type in &amp;lt;xs:list&amp;gt; [message #1413264 is a reply to message #1413252] Thu, 28 August 2014 03:05
Ed Merks is currently offline Ed Merks
Messages: 26013
Registered: July 2009
Senior Member
Gordan,

Comments below.

On 28/08/2014 8:42 AM, Gordan Vosicki wrote:
> Thanks Ed for your proposal, this might be a solution.
> Just a silly question:
>
> As the XSD file has to be modified anyhow until there is a way to
> define additonal things (like ecore:type) outside the original file
> (like in JAXB),
This relies only on an xmlns declaration and that declaration must be in
the XSD itself to be used there, so no. Given the nature of where these
annotations can appear (i.e., in all kinds of nested content) it's
significantly pretty tricky to define an external mapping and the
implementation of an authoring tool for doing so is also a significant
undertaking.
> I could also simply replacee the xs:integer and xs:positiveInteger
> types by xs:int or xs:long.
Yes.
>
> Would the XML read/write functions still work if I made this simpler
> change ?
Yes, in the end this only affects the conversion of strings in the XML
to Java instances so assuming the strings conform to the value range
implied by those Java types, it should all parse and serialize in the
expected/correct way.
>
> Another point:
> These lists have potentially hundreds of thousands of elements.
> I would prefer to use collection classes containing arrays of simple
> types instead of objects (int instead of Integer). We already have
> such classes, which actually implement java.util.List, and it would be
> easy to add support for EList.
I see. It's always possible to use your own custom data types...
>
> Is there a more elegant way to do it than to modify by hand the
> generated factory methods ?
> public List<BigInteger> createFaceTypeFromString(EDataType
> eDataType, String initialValue);
> public String convertFaceTypeToString(EDataType eDataType, Object
> instanceValue);
Somewhere you need to have had written code. You could do that in
another model and specify that model's type as the ecore:type (or define
that other model as an XML Schema and change the actual schema type= to
use that model's simple type).
>
> Is there anything else which has to be done for this, I personally
> hate modifying generated code ?
Yes, some folks have a strong aversion to that. At some point I'll look
at generalizing the generation-gap pattern and supporting it more
broadly, but that's also a significant undertaking (complicated by the
trickiness of finding custom overrides automatically in either source or
on the classpath)...
 Topic: [CDO] Old class cast exception resurfaces
Re: [CDO] Old class cast exception resurfaces [message #1413455 is a reply to message #1410787] Thu, 28 August 2014 10:57
David Wynter is currently offline David Wynter
Messages: 4548
Registered: July 2009
Senior Member
We tried the ECoreUtil.Copier method but it triggers the notify mechanism (why this occurs when you are copying I have no idea) and that causes:

Caused by: java.lang.UnsupportedOperationException: Unsupported notification received: ADD_MANY - Product.workflow
	at com.yambina.edm.commons.platform.listeners.EObjectNotifyChangeListener.checkMany(EObjectNotifyChangeListener.java:247)
	at com.yambina.edm.commons.platform.listeners.EObjectNotifyChangeListener.notifyChanged(EObjectNotifyChangeListener.java:88)
	at com.yambina.edmmodel.impl.NotifyingAdapter.notifyChanged(NotifyingAdapter.java:56)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.emf.ecore.util.DelegatingEcoreEList.dispatchNotification(DelegatingEcoreEList.java:355)
	at org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl.addAllUnique(DelegatingNotifyingListImpl.java:449)
	at org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl.addAllUnique(DelegatingNotifyingListImpl.java:392)
	at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:370)
	at org.eclipse.emf.ecore.util.DelegatingEcoreEList.set(DelegatingEcoreEList.java:566)
	at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
	at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
	at org.eclipse.emf.ecore.util.EcoreUtil.copy(EcoreUtil.java:357)
	at com.yambina.edm.validation.RawExporter.clone(RawExporter.java:97)
	at com.yambina.edm.validation.RawExporter.run(RawExporter.java:72)



Still finding the whole CDO mechanism impenetrable. Now I after reverting to our clone code I get this exception when trying to export my model to XMI.

Caused by: java.lang.ArrayStoreException
	at org.eclipse.emf.ecore.util.DelegatingEcoreEList.validate(DelegatingEcoreEList.java:147)
	at org.eclipse.emf.common.util.DelegatingEList.addUnique(DelegatingEList.java:334)
	at org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl.doAddUnique(DelegatingNotifyingListImpl.java:379)
	at org.eclipse.emf.common.notify.impl.DelegatingNotifyingListImpl.addUnique(DelegatingNotifyingListImpl.java:275)
	at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:303)
	at com.yambina.edm.validation.RawExporter.maintainAssociations(RawExporter.java:152)


Here is maintainAssociations
    private void maintainAssociations(final Collection<EObject> eObjects) throws InvocationTargetException {
        for (EObject eObject : eObjects) {
            EObject eObjectClone = this.clones.get(eObject);
            assert eObjectClone != null;

            Collection<EObject> children = new ArrayList<EObject>();
            for (EReference reference : eObjectClone.eClass().getEAllReferences()) {
                try {
                    Object value = eObject.eGet(reference);
                    
                    if (reference.isContainment()) {
                        if (reference.isMany()) {
                            children.addAll((Collection<EObject>) value);
                        } else {
                            CollectionUtils.addIgnoreNull(children, value);
                        }
                    }

                    if (reference.isMany()) {
                        Collection<EObject> list = (Collection<EObject>) eObjectClone.eGet(reference);
                        for (Object object : (Collection<?>) value) {
                            EObject child = (EObject) object;
                            EObject childClone = this.clones.get(child);
                            assert childClone != null;
                            try {
                            	list.add(childClone); // ArrayStoreException here
                            } catch (ArrayStoreException ase) {
                            	
                            }
                        }
                    } else {
                        EObject child = (EObject) value;
                        if (child != null) {
                            EObject childClone = this.clones.get(child);
                            assert childClone != null;
                            eObjectClone.eSet(reference, childClone);
                        }
                    }
                } catch (ObjectNotFoundException ex) {
                    this.invalidObjects.add(eObjectClone);
                    LogPlugin.error(LOG, true, "{0}#{1} references an object that can't be found", Utils.getFullyQualifiedName(eObject), reference.getName()); //$NON-NLS-1$
                }
            }

            this.maintainAssociations(children);
        }
    }




Here is where the error is found from line 141 of org.eclipse.emf.ecore.util.DelegtingEcoreEList
  @Override
  protected E validate(int index, E object)
  {
    super.validate(index, object);
    if (object != null && !isInstance(object))
    {
      throw new ArrayStoreException();
    }
    return object;
  }

  protected boolean isInstance(Object object)
  {
    return getFeatureType().isInstance(object);
  }

The featureType is set to our com.yambina.edmmodel.Resource and the object is com.yambina.edmmodel.UUIDImpl I cannot understand how this mismatch occurs.

These 2 classes related where Resource has an attribute ref which in a non containment reference to a BaseModel abstract class that has one attribute, the aforementioned UUID class. Somehow the feature of the Resource class gets set to the related UUID class. Not sure of the formality of the management of Feature related to the Class.

Jump in anyone...



Forum: Graphiti
 Topic: Multiple create features
Re: Multiple create features [message #1413230 is a reply to message #1412947] Thu, 28 August 2014 01:37
John Cole is currently offline John Cole
Messages: 29
Registered: June 2013
Junior Member
Thank you very much Michael! It works perfectly.
 Topic: Adding icons to the palette
Re: Adding icons to the palette [message #1413293 is a reply to message #884508] Thu, 28 August 2014 04:25
John Cole is currently offline John Cole
Messages: 29
Registered: June 2013
Junior Member
Hello Michael,

I've got a similar problem, so I post my question here.
I've created a DiagramImageProvider, registered it in the plugin.xml and in my CreateFeature I am trying to add an icon to the palette. So I override getCreateImageId(), which looks like this:
	@Override
	public String getCreateImageId() {
		if (DiagramImageProvider.isAvailable(IMG_ID)) {
			System.out.println(IMG_ID);
			return IMG_ID;
		}
		return null;
	}


The ID is availible in the ImageProvider but the problem is, that the method addAvailableImages() is never called (I tried to set a debug point inside).
So the icon of my CreateFeature in the palette is a simple red point:

index.php/fa/18984/0/

The image path and name seems to be correct.

What could be the problem? Is there a solution for this?

Thank you very much in advance!
  • Attachment: palette.png
    (Size: 4.70KB, Downloaded 19 times)

[Updated on: Thu, 28 August 2014 04:26]

Report message to a moderator

Re: Adding icons to the palette [message #1413436 is a reply to message #1413293] Thu, 28 August 2014 10:00
Michael Wenz is currently offline Michael Wenz
Messages: 1590
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Have you registered your image provider with your diagram type provider?

Here's the example for the tutorial:
<extension
point="org.eclipse.graphiti.ui.diagramTypeProviders">
<diagramTypeProvider
class="org.eclipse.graphiti.examples.tutorial.diagram.TutorialDiagramTypeProvider"
description="This is the editor for the Graphiti tutorial"
id="org.eclipse.graphiti.examples.tutorial.diagram.TutorialDiagramTypeProvider"
name="Graphiti Tutorial Editor">
<diagramType
id="org.eclipse.graphiti.examples.tutorial.diagram.TutorialDiagramType">
</diagramType>
<imageProvider
id="org.eclipse.graphiti.examples.tutorial.TutorialImageProvider">
<-------
</imageProvider>
<imageProvider
id="org.eclipse.graphiti.examples.common.ExampleImageProvider">
</imageProvider>
</diagramTypeProvider>
</extension>

Michael
 Topic: can I use graphiti as a lib in standalone app?
can I use graphiti as a lib in standalone app? [message #1413279] Thu, 28 August 2014 03:44
Joseph W is currently offline Joseph W
Messages: 1
Registered: August 2014
Junior Member
hi all,

Just want to create a standalone app that reads in a diagram file and parse that to biz objects.anyway idea how ? without deploy into eclipse as plugin ?

so far , I am not sure about where are the xsd for diagram xml file.are following the right ones?

github.com/eclipse/gmp.graphiti/tree/master/plugins/org.eclipse.graphiti.ui/schema

Could you please point me to the right direction ?

thanks a lot.
Re: can I use graphiti as a lib in standalone app? [message #1413437 is a reply to message #1413279] Thu, 28 August 2014 10:03
Michael Wenz is currently offline Michael Wenz
Messages: 1590
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Joseph,

have you seen
https://www.eclipse.org/forums/index.php/m/1392668/?srch=How+to+execite+graphiti+application+from+commandline#msg_1392668
?

That should point you to what you want to do.

Michael
 Topic: How to set the selection programmatically?
Re: How to set the selection programmatically? [message #1413434 is a reply to message #1413050] Thu, 28 August 2014 09:57
Michael Wenz is currently offline Michael Wenz
Messages: 1590
Registered: July 2009
Location: Walldorf, Germany
Senior Member
In the below coding you call setPictogramElementForSelection, but I
recommended to use selectPictogramElements. Have you tried with that as
well? The first one just sets a member variable for later selection, while
the second one really does the selection.
Michael
Re: How to set the selection programmatically? [message #1413465 is a reply to message #1413434] Thu, 28 August 2014 11:40
Al B is currently offline Al B
Messages: 42
Registered: June 2012
Member
Yes, I tried with selectPictogramElements, but nothing gets selected. setPictogramElementForSelection works though.

Maybe I'm not calling selectPictogramElements from the right place. I'm calling them from the AbstractUpdateFeature::update(IUpdateContext context) method.

[Updated on: Thu, 28 August 2014 11:46]

Report message to a moderator

Forum: RCP Testing Tool
 Topic: Cannot record test case in my AUT
Re: Cannot record test case in my AUT [message #1413254 is a reply to message #1413034] Thu, 28 August 2014 02:47
Ivan Inozemtsev is currently offline Ivan Inozemtsev
Messages: 11
Registered: August 2014
Location: Novosibirsk
Junior Member
Hi Pajtim,

Thanks for contacting us! In general, RCPTT should not depend on anything besides the following plugins:
org.eclipse.ui
org.eclipse.swt
org.eclipse. jface
org.eclipse.ui.workbench
All other dependencies should be optional. However it could be that some dependencies, thought declared as optional, on practice are required, and this is a definitely a bug on our side which should be fixed.

Could you provide a list of plugins in your application so that we can ensure that RCPTT runtime will work with your application? The simplest way to do it is to copy a contents of configuration details (help -> about -> installation details -> configuration) and save into some text file.

Also, it would be very helpful to have all stacktraces at the moment when AUT hangs to understand exactly why application is hanging. You can use jstack command line tool, which is part of JDK, to get stacktraces from any running Java application, by launching it from a command line like this 'jstack -l <pid>' (you can use task manager to determine a process id).

Thanks,
Ivan
Re: Cannot record test case in my AUT [message #1413298 is a reply to message #1413254] Thu, 28 August 2014 04:33
Pajtim Ajvazi is currently offline Pajtim Ajvazi
Messages: 4
Registered: August 2014
Junior Member
Hi Ivan,

thank you for your very quick reply.

In fact, the first exception that came up was that the class org.eclipse.core.resources.IResourceChangeListener could not be found. So I added org.eclipse.core.resources to my target platform and to my feature.

But now the AUT just freezes.

I attached the config and the stacktrace.


Thank you

Pajtim
Re: Cannot record test case in my AUT [message #1413311 is a reply to message #1413298] Thu, 28 August 2014 04:58
Ivan Inozemtsev is currently offline Ivan Inozemtsev
Messages: 11
Registered: August 2014
Location: Novosibirsk
Junior Member
Thanks a lot for your attachments! Stack dump is really helpful and it feels like there might be a deadlock (though it is not detected by jstack), and most likely dependencies are not a reason for a hang. Just one more question, could you add org.eclipse.ui.ide into your target platform and check whether it will hang?
Re: Cannot record test case in my AUT [message #1413331 is a reply to message #1413311] Thu, 28 August 2014 05:36
Ivan Inozemtsev is currently offline Ivan Inozemtsev
Messages: 11
Registered: August 2014
Location: Novosibirsk
Junior Member
Hmm, looks like I'm close to a solution Smile Here's what I think is happening here:
1. RCPTT Runtime gets a command from RCPTT IDE and starts initializing recorder by accessing a synchronized TeslaRecorder.getInstance method (top stack trace, "Tesla network client connection:7002" prio=6 tid=0x38735800 nid=0xdf0 in Object.wait() [0x3a88e000])
2. Runtime instantiates recorders, and one of recorders fails to instantiate (most likely that's the one listed in an Error log org.eclipse.rcptt.tesla.recording.core.swt.UIIDERecordingProcessor, which fails because of missing org.eclipse.ui.ide plugin) and this error is being logged
3. Your CustomsToolWorkbenchErrorHandler gets a notification and tries to show an error dialog via Display.syncExec
4. At the same time, In UI thread ("main" prio=6 tid=0x00e4dc00 nid=0xe3c waiting for monitor entry [0x00d9e000]), a dialog starts to appear and sends an event (InternalDialog.hideButton), which is intercepted by SWTEventRecorder (which is initialized by this time). SWTEventRecorder tries to access a TeslaRecorder.getInstance and hangs a UI thread.

Could you try disabling your com.kn.customstool.client.appmanager.CustomsToolWorkbenchErrorHandler just for an experiment?
icon14.gif  Re: Cannot record test case in my AUT [message #1413332 is a reply to message #1413311] Thu, 28 August 2014 05:38
Pajtim Ajvazi is currently offline Pajtim Ajvazi
Messages: 4
Registered: August 2014
Junior Member
Bam! Very Happy

Now it works!

Thank you very much Ivan!


EDIT:

Ah, sorry. I did not read your last reply. I just added "org.eclipse.ui.ide" and it worked.

[Updated on: Thu, 28 August 2014 05:44]

Report message to a moderator

Re: Cannot record test case in my AUT [message #1413336 is a reply to message #1413332] Thu, 28 August 2014 05:47
Pajtim Ajvazi is currently offline Pajtim Ajvazi
Messages: 4
Registered: August 2014
Junior Member
I've tried Jubula, because rcptt did not work, and it took me a whole day to setup everything and have one test case. That sucked.
Now with RCPTT I had the test running in minutes. I really like this tool.
 Topic: Problem when launching my AUT
Re: Problem when launching my AUT [message #1413411 is a reply to message #1413018] Thu, 28 August 2014 09:06
Ivan Inozemtsev is currently offline Ivan Inozemtsev
Messages: 11
Registered: August 2014
Location: Novosibirsk
Junior Member
It looks like RCPTT is not so good at automatic pickup of AUT plugins, when it is installed at read-only location, but some extra plugins are installed in a different location. Does your application require installation into Program Files? What if you unpack it in a writable location and install plugins, so that they come inside original plugins folder, does it work better?

If the reason is truly in EcorePlugin.doNotLoadResourcesPlugin=true, then we are kind of stuck without this property application can't be launched, with this property it does not work properly. I'm going to check whether we can postpone loading of ecore plugin in our runtime to make sure that its starts up only when your application sets up workspace location. Thanks!
Pages (4): [ «    1  2  3  4    »]


Current Time: Thu Aug 28 19:21:29 EDT 2014

Powered by FUDForum. Page generated in 0.12654 seconds