Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
No commit message
  • Loading branch information
jreimone committed Feb 26, 2015
1 parent af4deaf commit 2dc405c
Show file tree
Hide file tree
Showing 12 changed files with 162 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Examples/Screenshots/.classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
58 changes: 58 additions & 0 deletions Examples/Screenshots/.project
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Screenshots</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.emftext.language.refactoring.roles.resource.rolestext.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.emftext.language.refactoring.specification.resource.refspec.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.emftext.language.refactoring.rolemapping.resource.rolemapping.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.emftext.language.refactoring.composition.resource.refcomp.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.emftext.language.conference.resource.conference.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.emftext.language.refactoring.roles.resource.rolestext.nature</nature>
<nature>org.emftext.language.refactoring.specification.resource.refspec.nature</nature>
<nature>org.emftext.language.refactoring.rolemapping.resource.rolemapping.nature</nature>
<nature>org.emftext.language.refactoring.composition.resource.refcomp.nature</nature>
<nature>org.emftext.language.conference.resource.conference.nature</nature>
</natures>
</projectDescription>
7 changes: 7 additions & 0 deletions Examples/Screenshots/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
6 changes: 6 additions & 0 deletions Examples/Screenshots/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Screenshots
Bundle-SymbolicName: Screenshots
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
4 changes: 4 additions & 0 deletions Examples/Screenshots/build.properties
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
13 changes: 13 additions & 0 deletions Examples/Screenshots/models/FooBarCamp.conference
@@ -0,0 +1,13 @@
CONFERENCE
"International FooBar Camp"
("Peter Meyers")

TRACK "Interesting Stuff" :
AT 09:00 : TALK "The future of Foo" PRESENTED BY "Peter Meyers"
AT 10:00 : TALK "Foo vs. F00" PRESENTED BY "Andrew Bloomfield"
AT 11:00 : TALK "Onyl Bar-S is true" PRESENTED BY "Homer Simpson"

REGISTERED SPEAKERS :
"Peter Meyers" FROM Germany,
"Andrew Bloomfield" FROM USA,
"Homer Simpson" FROM USA
15 changes: 15 additions & 0 deletions Examples/Screenshots/models/FooBarCampAfter.conference
@@ -0,0 +1,15 @@
CONFERENCE
"International FooBar Camp"
("Peter Meyers")

TRACK "Interesting Stuff" :
AT 09:00 : TALK "The future of Foo" PRESENTED BY "Peter Meyers"

TRACK "Less Interesting Stuff" :
AT 10:00 : TALK "Foo vs. F00" PRESENTED BY "Andrew Bloomfield"
AT 11:00 : TALK "Onyl Bar-S is true" PRESENTED BY "Homer Simpson"

REGISTERED SPEAKERS :
"Peter Meyers" FROM Germany,
"Andrew Bloomfield" FROM USA,
"Homer Simpson" FROM USA
6 changes: 6 additions & 0 deletions Examples/Screenshots/refcomps/extractAndMoveMethod.refcomp
@@ -0,0 +1,6 @@
COMPOSITE REFACTORING "Extract and Move Method"
FOR <http://www.emftext.org/java>

<Extract Method> -> <Move Method> {
<ExtractXwithReferenceClass>.NewContainer = <MoveX>.Movee;
}
13 changes: 13 additions & 0 deletions Examples/Screenshots/refspecs/ExtractXwithReferenceClass.refspec
@@ -0,0 +1,13 @@
REFACTORING FOR <ExtractXwithReferenceClass>

STEPS {
object containerContainerObject := ContainerContainer from uptree(INPUT);
object origContainerObject := OrigContainer from path(INPUT);
index extractsIndex := first(INPUT);

create new nc:NewContainer in containerContainerObject.target;
assign nc.newName;
move origContainerObject.extracts to nc;
create new mr:MovedReference in origContainerObject.referer at extractsIndex;
set use of nc in mr.containerRef;
}
15 changes: 15 additions & 0 deletions Examples/Screenshots/rolemappings/extractTrack.rolemapping
@@ -0,0 +1,15 @@
ROLEMODELMAPPING FOR <http://www.emftext.org/language/conference>

"Extract Track" maps <ExtractXwithReferenceClass> {
Extract := Slot;
OrigContainer := Track{
extracts := slots;
};
NewContainer := Track (newName -> name){
moved := slots;
};
ContainerContainer := Conference{
source := elements:Track;
target := elements:Track;
};
}
@@ -0,0 +1,14 @@
RoleModel ExtractXwithReferenceClass {
ROLE OrigContainer ;
input ROLE Extract ;
ROLE NewContainer (newName) ;
ROLE ContainerContainer ;
optional ROLE MovedReference ;

OrigContainer [1 ..1 ] <>- Extract extracts [0 ..* ] ;
OrigContainer [1 ..1 ] <>- MovedReference referer [1 ..1 ] ;
NewContainer [1 ..1 ] <>- Extract moved [0 ..* ] ;
ContainerContainer [1 ..1 ] <>- NewContainer target [1 ..1 ] ;
ContainerContainer [1 ..1 ] <>- OrigContainer source [1 ..1 ] ;
MovedReference [1 ..1 ] -- NewContainer containerRef [1 ..1 ] ;
}
4 changes: 4 additions & 0 deletions Examples/Screenshots/scripts/refactoringscript.xml
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<session version="1.0">
<refactoring comment="Extract Track in FooBarCamp.conference:&#x0A;- specific for the generic refactoring &apos;ExtractXwithReferenceClass&apos;&#x0A;- executable for the language CONFERENCE (http://www.emftext.org/language/conference)&#x0A;- refactored elements:&#x0A;- has the following generic description: &#x0D;&#x0A;This role model describes all roles being used to express the original Martin Fowler refactoring &#x0D;&#x0A;&lt;a href=&quot;http://www.refactoring.com/catalog/extractMethod.html&quot;&gt;Extract Method&lt;/a&gt;.&#x0D;&#x0A;Therein statements contained in a method (e.g. Java) will be selected and removed to a newly created method.&#x0D;&#x0A;At the old position of the statements a method call will be set instead.&#x0D;&#x0A;" description="Extract Track in FooBarCamp.conference" flags="6" id="org.emftext.language.conference.refactoring.ExtractTrack" metamodel="http://www.emftext.org/language/conference" otherbindings="ContainerContainer=platform:/resource/Screenshots/models/FooBarCamp.conference#/" project="Screenshots" resource="platform:/resource/Screenshots/models/FooBarCamp.conference" rolemapping="Extract Track"/>
</session>

0 comments on commit 2dc405c

Please sign in to comment.