Skip to content
Snippets Groups Projects
Commit c9a4039d authored by Sebastian Krings's avatar Sebastian Krings
Browse files

parser version / bundle activation policy

parent 0eed2342
Branches
Tags
No related merge requests found
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/bparser-2.4.34-SNAPSHOT.jar"/> <classpathentry exported="true" kind="lib" path="lib/bparser-2.4.34-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/eventbstruct-2.4.34-SNAPSHOT.jar"/> <classpathentry exported="true" kind="lib" path="lib/eventbstruct-2.4.34-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/parserbase-2.4.34-SNAPSHOT.jar"/> <classpathentry exported="true" kind="lib" path="lib/parserbase-2.4.34-SNAPSHOT.jar"/>
<classpathentry kind="lib" path="lib/prologlib-2.4.34-SNAPSHOT.jar"/> <classpathentry exported="true" kind="lib" path="lib/prologlib-2.4.34-SNAPSHOT.jar"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>
...@@ -5,7 +5,6 @@ Bundle-SymbolicName: org.eventb.texteditor.parsers ...@@ -5,7 +5,6 @@ Bundle-SymbolicName: org.eventb.texteditor.parsers
Bundle-Version: 3.0.3.qualifier Bundle-Version: 3.0.3.qualifier
Bundle-Activator: org.eventb.texteditor.parsers.Activator Bundle-Activator: org.eventb.texteditor.parsers.Activator
Require-Bundle: org.eclipse.core.runtime Require-Bundle: org.eclipse.core.runtime
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ClassPath: ., Bundle-ClassPath: .,
lib/bparser-2.4.34-SNAPSHOT.jar, lib/bparser-2.4.34-SNAPSHOT.jar,
......
source.. = src/ source.. = src/
output.. = bin/ output.. = bin/
bin.includes = META-INF/,\ bin.includes = META-INF/,\
lib/,\
.,\ .,\
lib/bparser-2.4.29-SNAPSHOT.jar,\ lib/bparser-2.4.34-SNAPSHOT.jar,\
lib/eventbstruct-2.4.29-SNAPSHOT.jar,\ lib/eventbstruct-2.4.34-SNAPSHOT.jar,\
lib/guava-14.0.1.jar,\ lib/guava-14.0.1.jar,\
lib/jsr305-1.3.9.jar,\ lib/jsr305-1.3.9.jar,\
lib/parserbase-2.4.29-SNAPSHOT.jar,\ lib/parserbase-2.4.34-SNAPSHOT.jar,\
lib/prologlib-2.4.29-SNAPSHOT.jar lib/prologlib-2.4.34-SNAPSHOT.jar
...@@ -18,11 +18,9 @@ Require-Bundle: org.eventb.texttools;bundle-version="[2.0.0,3.1.0)";visibility:= ...@@ -18,11 +18,9 @@ Require-Bundle: org.eventb.texttools;bundle-version="[2.0.0,3.1.0)";visibility:=
org.eclipse.ui.workbench.texteditor, org.eclipse.ui.workbench.texteditor,
org.eventb.texteditor.parsers;bundle-version="1.0.0", org.eventb.texteditor.parsers;bundle-version="1.0.0",
org.eclipse.core.resources;bundle-version="3.8.1" org.eclipse.core.resources;bundle-version="3.8.1"
Bundle-ActivationPolicy: lazy Bundle-ClassPath: .
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: lib/commons-lang-2.4.jar,
.
Bundle-Vendor: Heinrich-Heine University Dusseldorf Bundle-Vendor: Heinrich-Heine University Dusseldorf
Export-Package: org.eventb.texteditor.ui, Export-Package: org.eventb.texteditor.ui,
org.eventb.texteditor.ui.editor org.eventb.texteditor.ui.editor
Import-Package: org.eclipse.ui.texteditor.link Import-Package: org.eclipse.ui.texteditor.link
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
...@@ -3,6 +3,5 @@ ...@@ -3,6 +3,5 @@
<classpathentry kind="src" path="src"/> <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src_generated"/>
<classpathentry kind="output" path="bin"/> <classpathentry kind="output" path="bin"/>
</classpath> </classpath>
...@@ -13,9 +13,7 @@ Require-Bundle: org.eclipse.jface.text;bundle-version="[3.6.0,4.0.0)", ...@@ -13,9 +13,7 @@ Require-Bundle: org.eclipse.jface.text;bundle-version="[3.6.0,4.0.0)",
org.eclipse.emf.compare.match;bundle-version="[1.2.2,2.0.0)", org.eclipse.emf.compare.match;bundle-version="[1.2.2,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.8.1,4.0.0)", org.eclipse.core.resources;bundle-version="[3.8.1,4.0.0)",
org.eclipse.emf.ecore, org.eclipse.emf.ecore,
org.eventb.texteditor.parsers;bundle-version="1.0.0" org.eventb.texteditor.parsers;bundle-version="3.0.3"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eventb.texttools, Export-Package: org.eventb.texttools,
org.eventb.texttools.formulas, org.eventb.texttools.formulas,
org.eventb.texttools.merge, org.eventb.texttools.merge,
...@@ -23,8 +21,5 @@ Export-Package: org.eventb.texttools, ...@@ -23,8 +21,5 @@ Export-Package: org.eventb.texttools,
org.eventb.texttools.prettyprint, org.eventb.texttools.prettyprint,
org.eventb.texttools.syntaxExtension org.eventb.texttools.syntaxExtension
Bundle-Vendor: Heinrich-Heine University Dusseldorf Bundle-Vendor: Heinrich-Heine University Dusseldorf
Bundle-ClassPath: ., Bundle-ClassPath: .
lib/dependencies/prologlib-2.4.22-SNAPSHOT.jar, Bundle-RequiredExecutionEnvironment: JavaSE-1.7
lib/dependencies/parserbase-2.4.22-SNAPSHOT.jar,
lib/dependencies/jsr305-1.3.9.jar,
lib/dependencies/bparser-2.4.22-SNAPSHOT.jar
...@@ -61,10 +61,13 @@ public class PersistenceHelper { ...@@ -61,10 +61,13 @@ public class PersistenceHelper {
* both Resource and IResource to be save. * both Resource and IResource to be save.
*/ */
// final long textTimestamp = getTextTimestamp(resource); // final long textTimestamp = getTextTimestamp(resource);
// REMOVED WORKAROUND BELOW: a better fix is to not ignore attributes in EventBReferencesCheck // REMOVED WORKAROUND BELOW: a better fix is to not ignore
// attributes in EventBReferencesCheck
// --- TODO: Workaround for save bug. The method getTextTimestamp // --- TODO: Workaround for save bug. The method getTextTimestamp
// --- returns in some cases -1 (no time annotation exists). I noticed // --- returns in some cases -1 (no time annotation exists). I
// --- that many different instances of the same resource exist. Some // noticed
// --- that many different instances of the same resource exist.
// Some
// --- are annotated, the others not. // --- are annotated, the others not.
long textTimestamp = getTextTimestamp(resource); long textTimestamp = getTextTimestamp(resource);
// if(textTimestamp == -1) // if(textTimestamp == -1)
...@@ -183,12 +186,13 @@ public class PersistenceHelper { ...@@ -183,12 +186,13 @@ public class PersistenceHelper {
// we should find a text representation in the EMF // we should find a text representation in the EMF
final String text = getTextAnnotation(resource); final String text = getTextAnnotation(resource);
/*
/* workaround for Bug #3305107 * workaround for Bug #3305107
* *
* When a machine- or contextfile is renamed the lastmodified date does not change. * When a machine- or contextfile is renamed the lastmodified date
* Since isTextUptodate() compares timestamps only, it returns true for renamed files. * does not change. Since isTextUptodate() compares timestamps only,
* */ * it returns true for renamed files.
*/
boolean namesMatch = true; boolean namesMatch = true;
final EventBNamedCommentedComponentElement rootElement = getComponent(resource); final EventBNamedCommentedComponentElement rootElement = getComponent(resource);
if (rootElement != null) { if (rootElement != null) {
...@@ -199,16 +203,23 @@ public class PersistenceHelper { ...@@ -199,16 +203,23 @@ public class PersistenceHelper {
PParseUnit pParseUnit = start.getPParseUnit(); PParseUnit pParseUnit = start.getPParseUnit();
String parsedName = null; String parsedName = null;
if (pParseUnit instanceof AMachineParseUnit) { if (pParseUnit instanceof AMachineParseUnit) {
parsedName = ((AMachineParseUnit)start.getPParseUnit()).getName().getText(); parsedName = ((AMachineParseUnit) start.getPParseUnit())
.getName().getText();
} }
if (pParseUnit instanceof AContextParseUnit) { if (pParseUnit instanceof AContextParseUnit) {
parsedName = ((AContextParseUnit)start.getPParseUnit()).getName().getText(); parsedName = ((AContextParseUnit) start.getPParseUnit())
.getName().getText();
} }
if (parsedName != null) { if (parsedName != null) {
if (!parsedName.equals(rootElement.getName())) { if (!parsedName.equals(rootElement.getName())) {
namesMatch = false; namesMatch = false;
System.err.println("Conflicting names of ParseUnit! Expected name: '" + rootElement.getName() + "' actual name: '" + parsedName + "'! Prettyprinting unit..."); System.err
.println("Conflicting names of ParseUnit! Expected name: '"
+ rootElement.getName()
+ "' actual name: '"
+ parsedName
+ "'! Prettyprinting unit...");
} }
} }
} catch (BException e) { } catch (BException e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment