Eclipse Community Forums
Forum Search:

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

Forum: EMF
 Topic: Help me to fix reset list of command execution
Help me to fix reset list of command execution [message #1457487] Fri, 31 October 2014 11:25
ramukumar M is currently offline ramukumar M
Messages: 7
Registered: June 2012
Junior Member
Hello All,
I have a dialog and It has 3 tables A,B,C.
Basic functionality is to fill items to B and C from A. and If I remove item either from B or C it has to go back to A.
All these actions are achieved after writing to model(EMF model) . to do that I am using basic commands like set / add/ remove./delete commands ,
if they click on cancel i have to revert all the changes don on this dialog.
Command execution is done then and there (This is the requirement Sad)
So i cant use compound command here.
Please give me an idea to solve this

Note:
All the there tables belongs to same model but different Eobjects Smile

Thanks in advance
Ramukumar M
Forum: Compare
 Topic: EMF Compare - Logical Model :: Loading dependent models
Re: EMF Compare - Logical Model :: Loading dependent models [message #1457420 is a reply to message #1455291] Fri, 31 October 2014 09:55
Laurent Goubet is currently offline Laurent Goubet
Messages: 1635
Registered: July 2009
Senior Member
Hi Preetam,

We have some issues on our side too with this "not loading" of resources that don't have changes (for example, if there are changes in a "notation" model but not in the UML behind it, we only load the notation... and the display is pretty bad Smile).

What we would ultimately like to provide for extenders is a mean to hook into the "final" resource set, after the comparison is done, to forcefully load new resources in that set since it's going to be displayed. Unfortunately, this hook has not been implemented yet.

You can, however, hook into the resource set we use for the comparison, though this API is very young and might be lacking in features and stability. Please have a look into the extension point org.eclipse.emf.compare.rcp.resourceSetHook, org.eclipse.emf.compare.ide.hook.IResourceSetHook.preLoadingHook(ResourceSet, Collection<? extends URI>) might be of interest to you. This API is not available in a stable build yet, so you'll have to use one of our nightlies (install through this update site or clone the repository at git://git.eclipse.org/gitroot/emfcompare/org.eclipse.emf.compare.git )

Do note that any new resource you load in this set will be considered for comparison, so we'll iterate over it even though it has no change, slowing down the process. If you'd like to contribute a better solution (a hook called after the comparison is done, before the display), we'll gladly look at it Smile.

Laurent Goubet
Obeo
 Topic: Compare Result of compare editor without the UI
Re: Compare Result of compare editor without the UI [message #1457424 is a reply to message #1456364] Fri, 31 October 2014 10:02
Laurent Goubet is currently offline Laurent Goubet
Messages: 1635
Registered: July 2009
Senior Member
Hi Shyam,

The comparison and display are not that tied together, unless you wish for your comparison to be launched through the "compare with" menu... in which case you are stuck with the Eclipse Team UI (which we only extend for our needs).

If you have your own means to launch a comparison along with your own UI to display its results and are only missing the "comparison" part, you can simply make use of EMF Compare programmatically (see the FAQ) and process the resulting Comparison model yourself.

Is that what you're searching for?

Laurent Goubet
Obeo
 Topic: EGit and EMFCompare, set logical merge as the default merging strategy for a specific file extension
Re: EGit and EMFCompare, set logical merge as the default merging strategy for a specific file exten [message #1457450 is a reply to message #1453672] Fri, 31 October 2014 10:38
Mirjan Merruko is currently offline Mirjan Merruko
Messages: 5
Registered: April 2014
Location: Helsinki
Junior Member
Hi Mikael,

I've found that it's impossible to apply three-way merging. I've filed a bug report here https://bugs.eclipse.org/bugs/show_bug.cgi?id=449212 . I'll keep trying this out and report any findings through bugzilla.

Best Regards,
Mirjan Merruko
 Topic: Help me to fix reset list of command execution
Re: Help me to fix reset list of command execution [message #1457429 is a reply to message #1456467] Fri, 31 October 2014 10:09
Laurent Goubet is currently offline Laurent Goubet
Messages: 1635
Registered: July 2009
Senior Member
Hi,

Are your columns representing different models (model A, model B, model C), showing these models' content? or are they showing the content of three distinct EObjects of the same model?

Whatever the case, this is not an EMF Compare question, but a more generic EMF one.

I am not that well versed into EMF transaction... But I think that if you have one command stack, you could record its "starting state" when you open the dialog and revert to that state (undoing every command one after the other) when the dialog is cancelled... you'd probably have better luck on the EMF forum though.

Laurent Goubet
Obeo
Re: Help me to fix reset list of command execution [message #1457488 is a reply to message #1457429] Fri, 31 October 2014 11:27
ramukumar M is currently offline ramukumar M
Messages: 7
Registered: June 2012
Junior Member
Thanks Laurent Goubet Smile
I have created a new topic under EMF Forum the link is https://www.eclipse.org/forums/index.php/m/1457487/#msg_1457487

If possible please close this topic

BR
Ramukumar M
Forum: EclipseLink
 Topic: Many to many with extra data in join table
Many to many with extra data in join table [message #1457492] Fri, 31 October 2014 11:34
Toni T is currently offline Toni T
Messages: 2
Registered: October 2014
Junior Member
Hi,
I'm having troubles with eclipselink JPA2 implementation.

I have this pattern:

Street
HouseNumber
PartOfStreet (M:M street:houseNumber with extra info)


@Entity
@EntityListeners(StreetValidatorListener.class)
@Table(name = "STREET")
@DiscriminatorValue(value = "STREET")
public class StreetImpl extends AreaImpl implements Street {

	@OneToMany(mappedBy = "street", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	Set<PartOfStreetImpl> houseNumbers = new HashSet<>();
...
}

@Entity
@Table(name = "HOUSE_NUMBER")
@DiscriminatorValue(value = "HOUSENUMBER")
public class HouseNumberImpl extends AreaImpl implements HouseNumber {

	@OneToMany( mappedBy = "houseNumber", fetch=FetchType.LAZY, cascade=CascadeType.ALL)
	private Set<PartOfStreetImpl> streets = new HashSet<>();

...
}

@Entity
@Table(name = "PART_OF_STREET", uniqueConstraints =  { @UniqueConstraint(columnNames = { "STREET_ID, HOUSE_NUMBER_ID" }) })
public class PartOfStreetImpl extends AbstractEntity implements PartOfStreet {
	@Id
	@SequenceGenerator(name = SEQUENCE_STYX_HOUSE_NUMBER_STREET_LINK_GENERATOR, sequenceName = "SEQ_PART_OF_STREET", allocationSize = 1, initialValue = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE_STYX_HOUSE_NUMBER_STREET_LINK_GENERATOR)
	private Long id;

	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
	@JoinColumn(name = "STREET_ID")
	private StreetImpl street;

	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
	@JoinColumn(name = "HOUSE_NUMBER_ID")
	private HouseNumberImpl houseNumber;
...
}


My problem is that when I want to create a relationship entity in between street and houseNumber, I have to persist street, houseNumber and then add partOfStreet and again persist houseNumber.

         @Test
	@Rollback(true)
	public void testHouseNumberBelongsToAStreet() {
		Street street = createAndSaveStreet();
		//FIXME: If houseNumber is not saved first, it tries to persist
		// partOfStreet without flushing the session so it can't find the parent id for 
		// housenumber
		houseNumber = houseNumberFacade.saveHouseNumber(houseNumber);
		
		PartOfStreet poStreet = houseNumberFacade.newPartOfStreet();
		poStreet.setStreet(street);
		poStreet.setHouseNumber(houseNumber);
		
		street.addPartOfStreet(poStreet);
		houseNumber.addPartOfStreet(poStreet);
		
//		houseNumberFacade.savePartOfStreet(poStreet);
		houseNumberFacade.saveHouseNumber(houseNumber);
		
		Long streetPartId = street.getPartOfStreets().iterator().next().getObjectId();
		Long housenumberPartId = houseNumber.getPartOfStreets().iterator().next().getObjectId();
		assertEquals(streetPartId, housenumberPartId);
		assertEquals(street.getPartOfStreets().iterator().next(), houseNumber.getPartOfStreets().iterator().next());
	}



Please, could you give some advice of what I'm doing wrong?
Why adding the partOfStreet to houseNumber and persisting it does not cascade the changes in a right way?


Thank you guys in advance.
 Topic: Many to many with extra data in join table
Many to many with extra data in join table [message #1457493] Fri, 31 October 2014 11:35
Toni T is currently offline Toni T
Messages: 2
Registered: October 2014
Junior Member
Hi,
I'm having troubles with eclipselink JPA2 implementation.

I have this pattern:

Street
HouseNumber
PartOfStreet (M:M street:houseNumber with extra info)


@Entity
@EntityListeners(StreetValidatorListener.class)
@Table(name = "STREET")
@DiscriminatorValue(value = "STREET")
public class StreetImpl extends AreaImpl implements Street {

	@OneToMany(mappedBy = "street", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	Set<PartOfStreetImpl> houseNumbers = new HashSet<>();
...
}

@Entity
@Table(name = "HOUSE_NUMBER")
@DiscriminatorValue(value = "HOUSENUMBER")
public class HouseNumberImpl extends AreaImpl implements HouseNumber {

	@OneToMany( mappedBy = "houseNumber", fetch=FetchType.LAZY, cascade=CascadeType.ALL)
	private Set<PartOfStreetImpl> streets = new HashSet<>();

...
}

@Entity
@Table(name = "PART_OF_STREET", uniqueConstraints =  { @UniqueConstraint(columnNames = { "STREET_ID, HOUSE_NUMBER_ID" }) })
public class PartOfStreetImpl extends AbstractEntity implements PartOfStreet {
	@Id
	@SequenceGenerator(name = SEQUENCE_STYX_HOUSE_NUMBER_STREET_LINK_GENERATOR, sequenceName = "SEQ_PART_OF_STREET", allocationSize = 1, initialValue = 1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SEQUENCE_STYX_HOUSE_NUMBER_STREET_LINK_GENERATOR)
	private Long id;

	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
	@JoinColumn(name = "STREET_ID")
	private StreetImpl street;

	@ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
	@JoinColumn(name = "HOUSE_NUMBER_ID")
	private HouseNumberImpl houseNumber;
...
}


My problem is that when I want to create a relationship entity in between street and houseNumber, I have to persist street, houseNumber and then add partOfStreet and again persist houseNumber.

         @Test
	@Rollback(true)
	public void testHouseNumberBelongsToAStreet() {
		Street street = createAndSaveStreet();
		//FIXME: If houseNumber is not saved first, it tries to persist
		// partOfStreet without flushing the session so it can't find the parent id for 
		// housenumber
		houseNumber = houseNumberFacade.saveHouseNumber(houseNumber);
		
		PartOfStreet poStreet = houseNumberFacade.newPartOfStreet();
		poStreet.setStreet(street);
		poStreet.setHouseNumber(houseNumber);
		
		street.addPartOfStreet(poStreet);
		houseNumber.addPartOfStreet(poStreet);
		
//		houseNumberFacade.savePartOfStreet(poStreet);
		houseNumberFacade.saveHouseNumber(houseNumber);
		
		Long streetPartId = street.getPartOfStreets().iterator().next().getObjectId();
		Long housenumberPartId = houseNumber.getPartOfStreets().iterator().next().getObjectId();
		assertEquals(streetPartId, housenumberPartId);
		assertEquals(street.getPartOfStreets().iterator().next(), houseNumber.getPartOfStreets().iterator().next());
	}



Please, could you give some advice of what I'm doing wrong?
Why adding the partOfStreet to houseNumber and persisting it does not cascade the changes in a right way?


Thank you guys in advance.
Forum: Epsilon
 Topic: Importing a Transformation trace from an etl-module into an eml-module
Re: Importing a Transformation trace from an etl-module into an eml-module [message #1457515 is a reply to message #1432088] Fri, 31 October 2014 12:03
Sebastian Zitzelsberger is currently offline Sebastian Zitzelsberger
Messages: 21
Registered: August 2014
Junior Member
Any update on this issue?
Re: Importing a Transformation trace from an etl-module into an eml-module [message #1457567 is a reply to message #1457515] Fri, 31 October 2014 13:09
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 887
Registered: July 2009
Senior Member
Hi Sebastian,

Apologies for the radio silecne - there hasn't been much progress on this I'm afraid. Is there any chance you could contribute a patch to speed things up?

Cheers,
Dimitris
Forum: Eclipse SmartHome
 Topic: ConfigDescriptionRegistry retrieval example
Re: ConfigDescriptionRegistry retrieval example [message #1457357 is a reply to message #1456954] Fri, 31 October 2014 08:37
karel goderis is currently offline karel goderis
Messages: 31
Registered: March 2014
Member
I understand - it is getThing().getChannels() which I need

The helper functions I was referring to were the enum classes that are defined in OH 1.x to store some config information. They can be abandoned, which is nice

Side question : from an architectural point of view, is it intented/ok to push new Parameters in the Configuration of a Channel or alike? e.g. to save some kind of state. I can imagine that this kind of run-time information could then be queried from a GUI or other place

K
Re: ConfigDescriptionRegistry retrieval example [message #1457574 is a reply to message #1457357] Fri, 31 October 2014 13:18
karel goderis is currently offline karel goderis
Messages: 31
Registered: March 2014
Member
Dennis,

What is the approach to follow if I want to have my channels to parametrised in the .xml, but not configurable in the DSL (e.g. .thing)? If I define a channel-type, see example below, then this assumes that in the DSL the user can define a Thing, and subsequently define Channels with parameters, right?

<thing-type id="sample">
<label>Oceanic Binding Thing</label>
<description>Sample thing for Oceanic Binding</description>

<channels>
<channel id="serial" typeId="serial-channel" />
</channels>
</thing-type>

<channel-type id="serial-channel">
<item-type>String</item-type>
<label>Serial Number</label>
<description>Serial Number of the Oceanic Water Softener</description>
<config-description>
<parameter name="command" type="text">
<label>Oceanic Command</label>
<description>Command to send to the Oceanic Water Softener.</description>
<required>true</required>
<default>getSRN</default>
</parameter>
<parameter name="type" type="text">
<label>Type</label>
<description>Type class of the values this command accepts or should be converted to</description>
<required>true</required>
<default>StringType</default>
</parameter>
<parameter name="method" type="text">
<label>Method</label>
<description>Method of the command, e.g "GET" or "SET"</description>
<required>true</required>
<default>GET</default>
</parameter>
</config-description>
</channel-type>

In order to reduce the burden of configuration in the DSL, the user could opt not to define the Channels in the .thing file, and thus (cfr other discussion thread), the Thing will be defined with all the channels as defined in thing.xml, and for each channel take the default parameter values as here above, right?. In the example above, I want to have a comprehensive thing.xml that that separates the core logic of the binding from the protocol definition (that is what it is in essence), so that changes in firmware of the oceanic water softener does not imply changes in the java code. So, the "command" parameter is somewhat fixed and not really intended to be configured in the DSL as such. Question is: is it better to put as much config stuff as possible in the .xml, and simplify the binding java code, or is it better to limit the stuff a user can config, but consequently define helper classes/enums in the java code to capture part of the configuration that is not to be amended by the user?

Cfr the example above, the equivalent in java is something like (with in casu, the 'text' field being the name of the Channel, btw):

public enum OceanicValueSelector {
getSRN ("serial", StringType.class,ValueSelectorType.GET),
getMAC ("mac", StringType.class,ValueSelectorType.GET),
getDNA ("name", StringType.class,ValueSelectorType.GET),
....
private final String text;
private Class<? extends Type> typeClass;
private ValueSelectorType typeValue;
...
@Override
public String toString() {
return text;
}
...
}

Tx
Karel
Forum: JFace
 Topic: FileFieldEditor Help
icon9.gif  Re: FileFieldEditor Help [message #1457582 is a reply to message #665674] Fri, 31 October 2014 13:29
Alfred Sterphone is currently offline Alfred Sterphone
Messages: 5
Registered: June 2011
Junior Member
I'm having this exact issue. Did you ever find a fix and/or workaround?
Forum: M2T (model-to-text transformation)
 Topic: 'Undefined argument' exception using Acceleo query from Sirius
Re: 'Undefined argument' exception using Acceleo query from Sirius [message #1457599 is a reply to message #1456644] Fri, 31 October 2014 13:51
Ed Willink is currently offline Ed Willink
Messages: 4115
Registered: July 2009
Senior Member
Hi

Looks like a familiar Acceleo bug.

In this case it may be aggravated by use of Integer for which Acceleo
can get confused between the user's Integer and the tooling's Integer.

Regards

Ed Willink


On 30/10/2014 15:25, Teun van de Berg wrote:
> Hi,
>
> Thanks for the reply. My examples contained an error.
> someOtherQuery->sum() is performed on the result of select. I've
> provided corrected examples below. The stacktrace also contains some
> more potentially relevant information:
>
>
> !MESSAGE Undefined argument subElement->collect(temp13 : SubElementType
> | temp13.someOtherQuery())->sum() of invocation at line 0 in Module
> diagramQueries for block anotherQuery(subElement->collect(temp13 :
> SubElementType | temp13.anotherQuery)->sum()).
>
>
> Corrected examples (changes from original post in bold:
>
> Failing query:
>
> [query public myQuery( var : m::type, var2 : m::type) : String =
> var.subElement->select(...).someOtherQuery->sum().anotherQuery()/]
>
>
> Succeeding query:
>
> [query public myQuery( var : m::type, var2 : m::type) : String =
> let a : Integer = var.subElement->select(...).someOtherQuery->sum() in
> a.anotherQuery()/]
>
>
> I don't see any open bugs for
> https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&classification=Modeling&component=Acceleo&product=M2T&title=Acceleo%20Bugs.
> I'll have a look at the
> https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&classification=Modeling&list_id=10377844&product=MDT.OCL&query_format=advanced.
>
>
> Kind regards,
> Teun
Forum: Model-to-Model Transformation
 Topic: [QVTo] how to query all objects from a referenced model ?
Re: [QVTo] how to query all objects from a referenced model ? [message #1457589 is a reply to message #1456406] Fri, 31 October 2014 13:35
Ed Willink is currently offline Ed Willink
Messages: 4115
Registered: July 2009
Senior Member
Hi

The whole thing depends on the concept of extent which is not
well-defined for model inputs.

OMG-wise it would appear that referenced models are definitely not
considered if they involve types not forming part of the true input.
Whether types that occur in the true input are included is vague.

Eclipse-wise, without studying the code, there is a design choice as to
whether extent corresponds to Resource or ResourceSet. The classic OCL
uses Resource, the Pivot OCL uses ResourceSet for allInstances().

You should get predictable behavior by explicitly navigating to the
roots of referenced resources and then using perhaps
Element::allSubobjects()

Regards

Ed Willink


On 30/10/2014 10:24, Julien DeAntoni wrote:
> Hello,
>
> I'm using QVTo to translate a model in another one (classical).
> My source model is referencing eObjects from another model (conforming
> to another MM)
>
> I used to do something like that to query all the objects of type XXX:
>
> inM.rootObjects().allSubObjects()[XXX] -> map ....
>
>
> However, this code does not work for the objects referenced from another
> model :(
> What am I missing ?
>
> is there a workaround ?
>
> thanks
>
> j
Re: [QVTo] how to query all objects from a referenced model ? [message #1457603 is a reply to message #1456406] Fri, 31 October 2014 13:57
Julien DeAntoni is currently offline Julien DeAntoni
Messages: 34
Registered: July 2009
Member
Hi,

thanks a lot for the answer...
Because the transformation is generated automatically (by an HOT) it would have been of great help to have a Element::veryAllSubObjects() Smile.

Anyway, I should be able to grab the good resource by calling black box java

thanks a lot Ed !

regards

julien
Forum: BIRT
 Topic: IndexOutOfBoundsException openning a report with 4.4.1 designer
Re: IndexOutOfBoundsException openning a report with 4.4.1 designer [message #1457392 is a reply to message #1448888] Fri, 31 October 2014 09:23
Matej Liszka is currently offline Matej Liszka
Messages: 9
Registered: March 2012
Junior Member
I created a patch for that bug in BIRT 4.4.1 by myself. Let me know if you need more info how to create it.
 Topic: statement return empty fields
statement return empty fields [message #1457612] Fri, 31 October 2014 14:09
Ihar Rubanovich is currently offline Ihar Rubanovich
Messages: 2
Registered: October 2014
Junior Member
Good day.
I have statment :
select public.warehouse_item_types.title, public.warehouse_item_units.code, 
 public.warehouse_document_operation_entries.amount,public.warehouse_document_operation_entries.price,
 public.warehouse_document_operation_entries.cost,public.vat_rate.value,public.warehouse_document_operation_entries.sum_vat_rate,
 public.warehouse_document_operation_entries.cost_with_vat
from public.warehouse_item_types, public.warehouse_item_units,public.warehouse_document_operation_entries,public.vat_rate
where public.warehouse_item_types.id in 
(select public.warehouse_operation_entries.warehouse_item_type_id
from public.warehouse_operation_entries 
where public.warehouse_operation_entries.warehouse_operation_id in 
(select public.warehouse_outgoing_goods_waybill.warehouse_operation_id 
from public.warehouse_outgoing_goods_waybill 
where public.warehouse_outgoing_goods_waybill.id = 493)) 
and public.warehouse_item_units.id = public.warehouse_item_types.units_id
and public.warehouse_document_operation_entries.warehouse_item_type_id = public.warehouse_item_types.id 
and public.vat_rate.id = public.warehouse_document_operation_entries.vat_rate_id 


It work , if I run it in PgAdminIII. But in Eclipse result is empty fields. How to adapt this statement for my report ?
Forum: Eclipse 4
 Topic: Eclipse 3.x Bridge Cannot Be Installed with e4 Tools
Re: Eclipse 3.x Bridge Cannot Be Installed with e4 Tools [message #1457346 is a reply to message #1456928] Fri, 31 October 2014 08:21
Jonas Helming is currently offline Jonas Helming
Messages: 460
Registered: July 2009
Senior Member
Hi,

the compüatibility layer is already part of Eclipse, in fact it is
mainly the org.eclipse.ui bundle. The Eclipse 3.x Bridge you are
referrng to provide Wrappers to use POJO Implementations using
dependency injection within 3.x.

Best regards

Jonas

Am 30.10.2014 22:38, schrieb Patty Eilers:
> In an attempt to develop an e4 RCP application that references/wraps
> Eclipse 3.x RCP plug-ins, I understand that I must use the compatibility
> layer which is supported by installing the Eclipse 3.x Bridge. However,
> when I attempt to do this I am informed that the e4 Tools and EMF will
> be un-installed as a result.
>
> Has anyone figured out how to get this working in Eclipse Luna 4.4?
Re: Eclipse 3.x Bridge Cannot Be Installed with e4 Tools [message #1457626 is a reply to message #1457346] Fri, 31 October 2014 14:27
Patty Eilers is currently offline Patty Eilers
Messages: 4
Registered: October 2014
Junior Member
Thank you for the prompt reply Jonas. It is the wrappers that I am looking to achieve...so my understanding is that I need to install the Eclipse 3.x Bridge plug-in (in accordance with the tutorial on your site). Is it a one or the other situation--use either 3.x Bridge or e4 Tools since they don't seem to be compatible?
Forum: EGit
 Topic: JGit HTTPS cloning is not working
Re: JGit HTTPS cloning is not working [message #1457639 is a reply to message #1176232] Fri, 31 October 2014 14:45
Johnatan Oliveira is currently offline Johnatan Oliveira
Messages: 1
Registered: October 2014
Junior Member
Hello, I come to ask for help in a research project I am working. My algorithm makes analysis of refactoring between versions of projects
software written in java language. For that I need to test the tool with several projects. My choice was between test versions of projects
exposed on github. For this, we developed an algorithm communicates with the api git. Use the egit and JGit, but currently the algorithm
captures only link by .git download link. How could I do to download several projects going .git? Example of my code:

String urlGit="github.com/centic9/jgit-cookbook.git";
File localPath = File.createTempFile("GitRepository", "", new File("C:/GitHub"));
downloadgit.specificDownload(localPath, urlGit);
..............

protected void specificDownload(File path, String url) throws Exception {
Git.cloneRepository()
.setDirectory(path)
.setURI(url)
.setBare(false)
.setCloneAllBranches(true)
.call();
}
Forum: Web Tools Project (WTP)
 Topic: DOM object
Re: DOM object [message #1457647 is a reply to message #714587] Fri, 31 October 2014 14:59
Swapna Mising name is currently offline Swapna Mising name
Messages: 1
Registered: July 2009
Junior Member
Hi,

I am getting null values if i use xpath to get nodes using the IDoMDocument, but the same Xpath works if we use the traditional way to DocumentBuilder .

Does the xpath construction differ for IDOMDocument ?

My xml files looks like this,
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<widget xmlns="<some link>" id="foo123.id" version="1.0.0">
<name>foo123</name>
<description>
Hello World sample application that responds to the deviceready event.
</description>
</widget>

my xpath is like this

(Element)xpath.evaluate("/widget/name", document.getDocumentElement(), XPathConstants.NODE);

Regards,
Swapna
Forum: Graphiti
 Topic: How to use IFeature
Re: How to use IFeature [message #1457425 is a reply to message #1450516] Fri, 31 October 2014 10:02
Michael Wenz is currently offline Michael Wenz
Messages: 1625
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Simon,

not sure, but maybe you forgot to add the newly created Connection to a
resource? That should happen inside the add feature's add method.

Michael
 Topic: Create PictogramLink for Diagram object itself.
Re: Create PictogramLink for Diagram object itself. [message #1457433 is a reply to message #1454448] Fri, 31 October 2014 10:11
Michael Wenz is currently offline Michael Wenz
Messages: 1625
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Simone,

the answer to the first question would be yes, but I would strongly suggest
that you separate the domain model from your graphical representation in
that case: all shapes and graphics algorithms of diagram A should go into an
EMF resource DiagramA, all shapes and graphics algorithms of diagram B in
another EMF resource DiagramB and your domain objects shopuld be stored in
yet another EMF resource Domain. Otherwise you will run into synchronization
issues in case you modify the common shape in B and have A opened in
parallel.

However, the link you are trying to set appears wrong to me. Instead of
linking the domain object to the diagram, you shopuld establish the link
between the shape representing your domain object and your domain object. In
fact there is no difference to the scenario where shape and domain object
"belong" to diagram A.

Michael
Re: Create PictogramLink for Diagram object itself. [message #1457511 is a reply to message #1457433] Fri, 31 October 2014 11:59
Simone Di Cola is currently offline Simone Di Cola
Messages: 52
Registered: February 2014
Member
Micheal,
Thanks for your answer. Can you give me an example of how I can achieve what you suggest?

Thanks
Simone
Re: Create PictogramLink for Diagram object itself. [message #1457549 is a reply to message #1457511] Fri, 31 October 2014 12:42
Michael Wenz is currently offline Michael Wenz
Messages: 1625
Registered: July 2009
Location: Walldorf, Germany
Senior Member
There is a small example of how to separate stuff into different EMF
resources linked in our FAQ, question 1 at
http://www.eclipse.org/graphiti/developers/faq.php

Hope that helps.

Michael
 Topic: Highlighting Connection of ConnectionDecorator
Re: Highlighting Connection of ConnectionDecorator [message #1457554 is a reply to message #1411040] Fri, 31 October 2014 12:47
Simon Sperl is currently offline Simon Sperl
Messages: 13
Registered: May 2014
Junior Member
Thanks a lot, getSelectionBorder does what I want.

But my problems persist with getting the decorators to update, I am pretty certain the fault lies;
//in DefaultRefreshBehavior
public void refreshRenderingDecorators(PictogramElement pe) {
	GraphicalEditPart ep = diagramBehavior.getEditPartForPictogramElement(pe);
	if (ep instanceof IShapeEditPart) {
		IShapeEditPart sep = (IShapeEditPart) ep;
		sep.refreshDecorators();
	}
}

ep is a instance of FreeFormConnectionEditPart (which is not a IShapeEditPart)
Even though I know what is wrong I don't really know how to fix it :/
 Topic: Redo add feature leads to an empty dirty diagram
Redo add feature leads to an empty dirty diagram [message #1457611] Fri, 31 October 2014 14:09
Laurent Le Moux is currently offline Laurent Le Moux
Messages: 169
Registered: September 2011
Senior Member
Hi all,

I have got the following problem. I implemented an add feature similar to the Graphiti tutorial one.
It works great and so does the undo action.
But redo does not add my pictogram element back to the diagram which is however marked as dirty.

In the debugger, I tried to get an idea of my digram content with the following results :

Before add : clean empty diagram whose content is displayed as the following array in the debugger
[null, [], [], null, [], [Color@OID70, Color@OID71], null, []]

My diagram is stored in CDO. OIDxx stands for the CDO ID of each object.

After AbstractFeatureProvider.addIfPossible : the following new CDO objects populate my dirty diagram
[null, [], [ContainerShape@oid1[NEW]], null, [], [Color@OID70, Color@OID71, Color@oid3[NEW], Color@oid4[NEW], Color@oid12[NEW]], [Font@oid13[NEW]], [PictogramLink@oid5[NEW], PictogramLink@oid14[NEW]]]

At this stage, everything looks normal and the PE is correctly displayed.

Before undo : dirty diagram
[[], [], [ContainerShape@oid1[NEW]], null, [], [Color@OID70, Color@OID71, Color@oid3[NEW], Color@oid4[NEW], Color@oid12[NEW]], [Font@oid13[NEW]], [PictogramLink@oid5[NEW], PictogramLink@oid14[NEW]]]

Surprisingly, the first null entry has been replaced by an empty array...

After undo : except null replaced by the empty array, we are back to the initial diagram content which is marked as clean
[[], [], [], null, [], [Color@OID70, Color@OID71], [], []]


Berfore redo : clean diagram (fair enough...)
[[], [], [], null, [], [Color@OID70, Color@OID71], [], []]


After redo : dirty diagram and here, everything goes messy...
[[], [], [], null, [], [Color@OID70, Color@OID71, Color@oid17[NEW], Color@oid18[NEW], Color@oid19[NEW]], [], [PictogramLink@oid21[NEW], PictogramLink@oid24[NEW]]]

Colors and pictogram links have correctly been added back (with their new cdo IDs) but the container shape and the font objects are missing...

Any idea why this happens or where to look ?

Kind regards,

Laurent
 Topic: How can I combine nested feature calls in one command
Re: How can I combine nested feature calls in one command [message #1457223 is a reply to message #986950] Fri, 31 October 2014 05:24
Thorsten Schlathölter is currently online Thorsten Schlathölter
Messages: 210
Registered: February 2012
Location: Düsseldorf
Senior Member
Hello,
I also have problems with executing features and having multiple commands instead of one. This is my scenario: I want to add a shape, a connection and do a layout afterwards. All in one operation.

This is basically what I do:

Within the execution of an add feature for a shape
- retrieve and execute an addConnectionFeature
- call layoutPictogramElement (which in turn retrieves a layoutFeature which is executed. )


If I understand this here correct, I should be able to call features from within features with all ending up in the same command. I debugged the code but I cannot find where collecting the different operations into one really happens. Can someone point me to the right direction please?

Quote:

You will only need to wrap the calls into GenericFeatureCommandWithContext
in case you trigger the feature not from within the execution of another
feature. In case you want to trigger from within a feature (e.g. direct
editing) you should simply call the methods directly. This will cause the
update to happen within the same transactional EMF change and add only one
entry to the command stack so there is only one undo added.


Help would be appreciated
Regards
Thorsten
Re: How can I combine nested feature calls in one command [message #1457543 is a reply to message #1457223] Fri, 31 October 2014 12:39
Michael Wenz is currently offline Michael Wenz
Messages: 1625
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Thorsten,

actually, all features (also the ones that are called from within another
feature) will be wrapped in GEF and EMF commands. While executing the EMF
command on the EMF workspace command stack, a check for an existing outer
transaction is done. In case there is no outer transaction, the command es
executed within a new transaction, in case one exists, the command is simply
executed within the current one.

You can have a look at GFWorkspaceCommandStackImpl.execute for details.

Michael
Re: How can I combine nested feature calls in one command [message #1457658 is a reply to message #1457543] Fri, 31 October 2014 15:14
Thorsten Schlathölter is currently online Thorsten Schlathölter
Messages: 210
Registered: February 2012
Location: Düsseldorf
Senior Member
Michael,
thank you very much for the pointer. As I said. I debuged the code but I did not find the GFWorkspaceCommandStackImpl because we are using an existing ResourceSet and EditingDomain with other project resources. We only use a simple WorkspaceCommandStackImpl. If I use the GFWorkspaceCommandStackImpl then everything works like a charme. Is there anything you could tell me that speaks against using the GFWorkspaceCommandStackImpl for our whole ProjectResourceSet in general?

Regards,
Thorsten
Forum: EMF Diff/Merge
 Topic: merging text question
merging text question [message #1457677] Fri, 31 October 2014 15:34
Stephane Bouchet is currently offline Stephane Bouchet
Messages: 261
Registered: July 2009
Senior Member
hi,

is it possible to merge only some chars from a diff between text ?
like : http://www.eclipse.org/emf/compare/documentation/latest/images/EMF_Compare_Text_Compare.png

if not, i've created a request
https://bugs.eclipse.org/bugs/show_bug.cgi?id=449481
Forum: Newcomers
 Topic: Clean, Auto Build does not work
Re: Clean, Auto Build does not work [message #1457040 is a reply to message #1453664] Fri, 31 October 2014 00:27
koray katmer is currently offline koray katmer
Messages: 2
Registered: October 2014
Junior Member
Mohd Hafizzul Mohd Salleh wrote on Mon, 27 October 2014 09:32
I face the same problem while after moving the workspace from another computer. I think the .metadata folder's contents has ben messed up because after replacing the whole .metadata folder with the old one, I can compile again.


Really able to recompile problem.
 Topic: Need Help
Re: Need Help [message #1457161 is a reply to message #1456622] Fri, 31 October 2014 03:42
Hou Zhipeng is currently offline Hou Zhipeng
Messages: 5
Registered: October 2014
Junior Member
Thank you very much. Although I can't find the Swing Designer by the way you suggest, I have found another in Eclipse .The Eclipse IDE for java developers has Window Builder in the new option. But thank you very much for giving me a reply.
 Topic: Eclipse on Windows: How to prevent raise on gain focus?
Eclipse on Windows: How to prevent raise on gain focus? [message #1457532] Fri, 31 October 2014 12:23
Ulrich Scholz is currently offline Ulrich Scholz
Messages: 4
Registered: September 2013
Junior Member
I'm using Eclipse on Windows 8.1. If Eclipse gains focus (i.e., by clicking on any part of it), it always raises all its windows. How to disable that "functionality"?

Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800
 Topic: Starting Equinox development in Luna
Starting Equinox development in Luna [message #1457681] Fri, 31 October 2014 15:36
Marc Riehm is currently offline Marc Riehm
Messages: 2
Registered: October 2014
Junior Member
I am trying to start some Equinox development in Eclipse Luna. I am trying to create a new Bundle/Plug-in project (File --> New --> Project), but the option is not there. Therefore I am trying to install Equinox support, however the installer does not recognize the file "equinox-SDK-LunaSR1.zip".

Any help would be appreciated!

Thanks, --Marc.
Forum: Equinox
 Topic: Could not acquire the framework manipulator service
icon13.gif  Could not acquire the framework manipulator service [message #1457465] Fri, 31 October 2014 10:58
joao Mising name is currently offline joao Mising name
Messages: 1
Registered: July 2009
Junior Member
when trying to uninstall any bundle, I'm having this problem:
Quote:
An error occurred while unconfiguring the items to uninstall
session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Unconfigure, operand=[R]org.eclipse.equinox.ds 1.4.200.v20131126-2331 --> [R]org.eclipse.equinox.ds 1.4.200.v20131126-2331, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.SetProgramPropertyAction).
Could not acquire the framework manipulator service.
Could not acquire the framework manipulator service.


on eclipse:
Version: 4.4.0.v20140925-0400
Build id: I20140606-1215

I've searched the forum but I find uncomplete remarks, as an example, somewhere I found a suggestion to tweak the start levels of the plugins, but I can't find the xml with that configuration for me to tweak it.
has anyone experienced this?
 Topic: Request Rules Governing Whether Artifacts (Plug-ins) Are Unpacked or Unzipped in Target Platform
Re: Request Rules Governing Whether Artifacts (Plug-ins) Are Unpacked or Unzipped in Target Platform [message #1457667 is a reply to message #546088] Fri, 31 October 2014 15:21
Tobias Oberlies is currently offline Tobias Oberlies
Messages: 1
Registered: July 2009
Junior Member
The default value of the unpack attribute is "true", so for the bundles you don't want to have unpacked, you need to have unpack="false".
 Topic: Trouble starting Equinox development in Luna
Trouble starting Equinox development in Luna [message #1457685] Fri, 31 October 2014 15:42
Marc Riehm is currently offline Marc Riehm
Messages: 2
Registered: October 2014
Junior Member
I am trying to start an OSGI/Equinox project in Luna. I cannot start a new Bundle/Plug-In project, i.e. File --> New --> Project has no support for "OSGI", "Bundle", or "Plug-In". I tried downloading the Equinox Zip (equinox-SDK-LunaSR1.zip), and installing it locally, but the installer does not recognize the zip file.

How do I install Equinox support in Luna and get started with development?

Thanks, --Marc.
Re: Trouble starting Equinox development in Luna [message #1457686 is a reply to message #1457685] Fri, 31 October 2014 15:44
Pascal Rapicault is currently offline Pascal Rapicault
Messages: 291
Registered: July 2009
Location: Ottawa
Senior Member
You need to install the "Eclipse Plug-in Development Environment" from the luna repository.
Pages (3): [ «    1  2  3    »]


Current Time: Fri Oct 31 15:57:51 GMT 2014

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

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