Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
danilovesky committed Feb 4, 2014
2 parents 8a48cea + f240638 commit 7386c35
Show file tree
Hide file tree
Showing 38 changed files with 6,135 additions and 4,522 deletions.
25 changes: 19 additions & 6 deletions Plugins/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<class name="workcraft.petri.PetriModel"/>
<class name="workcraft.petri.EditablePetriTransition"/>
<class name="workcraft.petri.EditablePetriPlace"/>
<class name="workcraft.petri.EditablePetriPlace"></class>
<class name="workcraft.petri.PetriLabelSaver"/>
<class name="workcraft.petri.PetriDotGSaver"/>
<class name="workcraft.petri.PetriDotGSaver2"/>
<class name="workcraft.petri.PetriDotGSaver3"/>
<class name="workcraft.petri.PetriDotPNTSaver"/>
<class name="workcraft.petri.PetriKiller"/>
<class name="workcraft.petri.PetriKiller"></class>
<class name="workcraft.petri.PetriUnfolder"/>
<class name="workcraft.petri.PetriMPSAT"/>
<class name="workcraft.petri.ReadArcsComplexityReduction"/>
Expand Down Expand Up @@ -43,11 +43,24 @@
<class name="workcraft.chetri.ChetriModel"/>
<class name="workcraft.chetri.EditableChetriTransition"/>
<class name="workcraft.chetri.EditableChetriPlace"/>
<class name="workcraft.chetri.EditableChetriPlace"/><class
name="workcraft.stg.STGModel">
</class>
<class name="workcraft.stg.EditableSTGPlace"></class>
<class name="workcraft.stg.EditableSTGTransition"></class>
<class name="workcraft.stg.STGDotGSaver"></class>
<class name="workcraft.stg.STGDotGLoader"></class>
<class name="workcraft.stg.STGSemimodularityChecker"></class>
<class name="workcraft.stg.STGPetrify"></class>
<class name="workcraft.stg.STGRemoveNumbers"></class>
<class name="workcraft.stg.STGAddNumbers"></class>
<class name="workcraft.stg.STGUnfolder"></class>
<class name="workcraft.stg.STGDeadlockCheck"></class>
<class name="workcraft.stg.STGSelectByID"></class>
<class name="workcraft.sdfs.SDFSCriticalCycleAnalyzer"/>
<class name="workcraft.sdfs.SDFSCriticalCycleAnalyzer"/>
<class name="workcraft.sdfs.ASDFSMapper"/>
<class name="workcraft.sdfs.SDFS2MGMapper"/>
Expand Down Expand Up @@ -87,8 +100,8 @@
<class name="workcraft.gate.Joint"/>
<class name="workcraft.gate.Input"/>
<class name="workcraft.gate.Output"/>
<class name="workcraft.gate.BlackBox"/>
<class name="workcraft.gate.BlackBox"/><class name="workcraft.gate.MEElement"></class>
<class name="workcraft.gate.MEElement"/>
<class name="workcraft.gate.ExtractInterface"/>
Expand Down
Binary file added util/petrify.dll
Binary file not shown.
Binary file added util/petrify.exe
Binary file not shown.
Binary file added util/write_sg.exe
Binary file not shown.
42 changes: 40 additions & 2 deletions workcraft/DocumentBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public int getNextId() {
protected Boolean drawLabels = true;
protected Boolean drawIds = true;
protected Boolean loading = false;

protected Boolean showGrid = true;
protected Boolean showLabels = true;
protected Boolean showIDs = true;
Expand All @@ -81,22 +82,59 @@ public int getNextId() {
protected boolean showHighlight = false;
protected Colorf highlightColor = new Colorf(1.0f, 0.0f, 0.0f, 1.0f);

public void recBind(BasicEditable n, WorkCraftServer server) {
try {
server.registerObject(n, n.getId());
} catch (DuplicateIdException e) {
e.printStackTrace();
}
for (BasicEditable nn : n.getChildren()) {
recBind(nn, server);
}
}

public void loadEnd() {
loading = false;

}

public void loadStart() {
loading = true;
}

public void removeComponent(BasicEditable c) {
public boolean isLoading() {
return loading;
}

public void bind(WorkCraftServer server) {
this.server = server;
server.python.set("_document", this);
if (root!=null)
recBind(root, server);
}

public void removeComponent(BasicEditable c) throws UnsupportedComponentException {
if (server!=null)
server.unregisterObject(c.getId());
idMap.remove(c.getId());

for (BasicEditable n : c.getChildren())
removeComponent (n);
}

public void addComponent(BasicEditable c) throws UnsupportedComponentException, DuplicateIdException {
root.removeChild(c);
}

public void addComponent(BasicEditable c, boolean auto_name) throws UnsupportedComponentException {
//System.err.println ("Adding component " + c.getId());
if (auto_name && loading)
try {
c.setId(c.getId()+"_ld");
} catch (DuplicateIdException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
idMap.put(c.getId(), c);
// root.addChild(c);
c.setOwnerDocument(this);
Expand Down Expand Up @@ -134,7 +172,7 @@ public Object saveState() {
return list;
}

public void fromXmlDom(Element element) {
public void fromXmlDom(Element element){
/* String id = e.getAttribute("id");
label = e.getAttribute("label");
NodeList nl = e.getElementsByTagName("transform");
Expand Down
Loading

0 comments on commit 7386c35

Please sign in to comment.