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