Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343597 - Support for logical models in EGit
Summary: Support for logical models in EGit
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Benjamin Muskalla CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 354474 375084 375086 346450 348060
Blocks:
  Show dependency tree
 
Reported: 2011-04-21 13:28 EDT by Benjamin Muskalla CLA
Modified: 2012-03-22 12:16 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2011-04-21 13:28:43 EDT
In EGit, we should ensure to support operations as part of the Eclipse Logical models support.
This essentialy means that we need to call the Team API to provide us information about the logical view on resources instead of the raw file view.

See http://help.eclipse.org/help33/topic/org.eclipse.platform.doc.isv/guide/team_model_repo.htm for more information.
Comment 1 Robin Rosenberg CLA 2011-05-21 11:46:42 EDT
One thing that comes to my mind is the case where a logical model only maps to part of a file and requires special code to compute a diff. Some modeling tools would fit into this category. 

Is that what you have in mind?
Comment 2 Benjamin Muskalla CLA 2011-05-23 08:31:06 EDT
Yep, this is part of the whole story. This week, I'll provide the first step for supporting logical models by considering them in the commit operations to define the scope which files need to be commited as part of a change.
Regarding the special diff, we have to look into this, depending on the team support we have. From what I can see now, logical models only operate on a file level (eg. when you commit File A, then you need File B too). The special diff could be interesting when merging changes.
Comment 3 Benjamin Muskalla CLA 2011-05-31 10:14:44 EDT
I pushed an example project for logical models to https://github.com/bmuskalla/logical_models
Comment 4 Benjamin Muskalla CLA 2011-06-01 19:22:25 EDT
Pushed RFC as http://egit.eclipse.org/r/#change,3615

Remaining issues:
* unstaged changes are not included, see task 346632
Comment 6 Benjamin Muskalla CLA 2011-07-14 18:40:07 EDT
Pushed changes related to logical model merges

* http://egit.eclipse.org/r/#change,3874 (JGit)
* http://egit.eclipse.org/r/#change,3875 (EGit)
Comment 7 Benjamin Muskalla CLA 2011-08-01 13:05:13 EDT
Matthias, here are some notes regarding testing the changes:

Setup

	•  Use patches from Gerrit
	•  Clone EMF Compare Git Repo: http://git.eclipse.org/gitroot/emfcompare/org.eclipse.emf.compare.git
	•  Import projects
		•  org.eclipse.emf.compare
		•  org.eclipse.emf.compare.diff
		•  org.eclipse.emf.compare.logical
		•  org.eclipse.emf.compare.logical.ui
		•  org.eclipse.emf.compare.match
		•  org.eclipse.emf.compare.ui

Use these + EGit for a self-hosted runtime instance.

* Workflows with EMF Compare
** Clone example project: https://github.com/bmuskalla/logical_models
** Import project, use EMF subfolder

Resource scoping

* Change both files, try the following commands on one of the files
** Commit, Add, Replace
** These should help to to select the right resource set to operate on (eg. both modified, both should be committed)
Comment 8 Matthias Sohn CLA 2011-08-20 19:22:37 EDT
(In reply to comment #7)
> Matthias, here are some notes regarding testing the changes:
> 
> Setup
> 
>     •  Use patches from Gerrit
>     •  Clone EMF Compare Git Repo:
> http://git.eclipse.org/gitroot/emfcompare/org.eclipse.emf.compare.git
>     •  Import projects
>         •  org.eclipse.emf.compare
>         •  org.eclipse.emf.compare.diff
>         •  org.eclipse.emf.compare.logical
>         •  org.eclipse.emf.compare.logical.ui

this doesn't compile :

The method createTypedElement(EObject) of type LogicalModelCompareInput must override a superclass method	LogicalModelCompareInput.java	/org.eclipse.emf.compare.logical.ui/src/org/eclipse/emf/compare/logical/ui	line 54	Java Problem


>         •  org.eclipse.emf.compare.match
>         •  org.eclipse.emf.compare.ui

this doesn't compile:

Bundle 'org.eclipse.emf.ecore.editor' cannot be resolved	MANIFEST.MF	/org.eclipse.emf.compare.ui/META-INF	line 16	Plug-in Problem

The type org.eclipse.jface.viewers.Viewer cannot be resolved. It is indirectly referenced from required .class files	ParameterizedStructureMergeViewerCreator.java	/org.eclipse.emf.compare.ui/src/org/eclipse/emf/compare/ui/viewer/structure	line 1	Java Problem

> 
> Use these + EGit for a self-hosted runtime instance.
> 
> * Workflows with EMF Compare
> ** Clone example project: https://github.com/bmuskalla/logical_models
> ** Import project, use EMF subfolder
> 
> Resource scoping
> 
> * Change both files, try the following commands on one of the files
> ** Commit, Add, Replace
> ** These should help to to select the right resource set to operate on (eg.
> both modified, both should be committed)

any hints which dependencies I am missing ? I am using Eclipse SDK 3.7.0
Comment 9 Benjamin Muskalla CLA 2011-08-23 11:52:49 EDT
I just used an Indigo Modeling package as target platform to test these things, might be easier for get all dependencies right.

Adding Laurent if he has some insights on the compilation problems.
Comment 10 Laurent Goubet CLA 2011-08-24 03:32:37 EDT
I know for sure that we never commit something that does not compile (lest we pay chocolates to all of the team :p).

Jokes aside ... The latest code from master should compile on both Helios and Indigo. The most likely depedency you're missing is EMF (from the update manager, either "Helios" or "Indigo" update sites : "Modeling > EMF - Eclipse Modeling Framework SDK"). Installing that will at least solve the "org.eclipse.emf.ecore.editor missing" issue.

As for the first issue (method must override...), I believe it is one and the same : "EObject" cannot be resolved (comes from EMF) and thus the Java compiler does not "see" the override properly.
Comment 11 Matthias Sohn CLA 2011-08-24 07:24:18 EDT
installing Eclipse Modeling Framework SDK was sufficient to fix the compile problems
Comment 12 Benjamin Muskalla CLA 2011-08-25 21:20:43 EDT
Thanks Matthias for reviewing these things, very much appreciated!