public HyperlinkAction(IDEState ids, GUIResources resources){ this.ids=ids; this.resources=resources; browser=new BrowserImp(ids); }
public CommonMenuEntriesActionFactory(GUIResources resources, IDEState state){ this.resources=resources; this.state=state; browser=new BrowserImp(state); }
public UpdateToolsAndCG(ManageExtensions me, ModuleLoader ml, IDEState ids) { this.me = me; this.ids=ids; this.ml=ml; browser=new BrowserImp(ids); }
public ObjectTreeMenuEntries(IDEState ids, GUIResources resources){ this.ids=ids; this.resources=resources; browser=new BrowserImp(ids); }
/** * Performs an empty initialisation. Only works when there is an already existing * instance of GraphManager * *@exception Exception Description of Exception */ public static void initialise(IDEState ids) { // To check if it is initialised browser = new BrowserImp(ids); }
/** * Initialises the diagram browser with a INGENIAS specification file * *@param file Description of Parameter *@exception Exception Description of Exception */ public static Browser initialise(String file) throws ingenias.exception.UnknowFormat, ingenias.exception.DamagedFormat, ingenias.exception.CannotLoad { //browser = new BrowserImp(IDEState.emptyIDEState()); browser = new BrowserImp(file); return browser; }
public GraphRelationshipFactory(IDEState ids){ this.ids=ids; browser=new BrowserImp(ids); }
public static void main(String[] args) { ObjectLoad objectLoad1 = new ObjectLoadImp1(new BrowserImp(IDEState.emptyIDEState())); }
public Vector<AbstractAction> createEntityActions(final Entity ent) { Vector<AbstractAction> actions=new Vector<AbstractAction>(); final BrowserImp bimp=new BrowserImp(state); actions.add( new AbstractAction("Search occurrences") {
GraphEntityImp(ingenias.editor.entities.Entity ent, org.jgraph.graph.DefaultGraphCell dgc, ModelJGraph graph, IDEState ids) throws NullEntity{ super(ent,graph,ids); if (ent==null) throw new ingenias.exception.NullEntity(); this.ent=ent; this.graph=graph; this.dgc=dgc; this.ids=ids; if (graph==null){ throw new RuntimeException("Graph is null in entity "+ent+ " when creating a GraphEntityImp"); } if (ids==null) throw new RuntimeException("The ids parameter cannot be null"); browser=new BrowserImp(ids); }
GraphEntityImp(ingenias.editor.entities.Entity ent, ModelJGraph graph, IDEState ids) throws NullEntity{ super(ent,graph,ids); if (ent==null) throw new ingenias.exception.NullEntity(); this.ent=ent; this.graph=graph; dgc=this.getCell(graph); this.ids=ids; if (graph==null){ throw new RuntimeException("Graph is null in entity "+ent+ " when creating a GraphEntityImp"); } if (ids==null) throw new RuntimeException("The ids parameter cannot be null"); this.browser=new BrowserImp(ids); }
/** * Description of the Method * *@param args Description of Parameter *@exception Exception Description of Exception */ public static void main(String args[]) throws Exception { String file = args[0]; Browser b = new BrowserImp(file); Graph[] gs = b.getGraphs(); for (int k = 0; k < gs.length; k++) { System.err.println(gs[k].getType() + ":" + gs[k].getName()); } }
/** * Sets the version attribute of the PersistenceManager object * * @param ver * The new version value * @exception UnknownVersion * Description of Exception */ private void setVersion(String ver, IDEState ids) throws UnknownVersion { if (ver.equals("1.0")) { gl = new GraphLoadImp1(); rl = new RelationshipLoadImp1(); ol = new ObjectLoadImp1(new BrowserImp(ids)); pl = new PropertyLoadImp1(); } else { if (ver.equals("1.1") ||ver.equals("1.2")) { gl = new GraphLoadImp2(); rl = new RelationshipLoadImp2(); ol = new ObjectLoadImp1(new BrowserImp(ids)); pl = new PropertyLoadImp1(); } else { gl = new GraphLoadImp1(); rl = new RelationshipLoadImp1(); ol = new ObjectLoadImp1(new BrowserImp(ids)); pl = new PropertyLoadImp1(); } } // throw new UnknownVersion(); }
private Vector<String> getDifferences() { try { Browser bimp=BrowserImp.initialise(watchedFile.getCanonicalPath()); ModelJGraph.enableAllListeners(); // a browser initialised through the initialise method is assumed to be //linked to no gui. Therefore, the persistence does load the spec without any listeners // and this prevents some runtime exception due to the event managers acting over elements in the specification // which were not layered out. This causes the listeners to be disabled by default, which is handled by // a static var. So, loading a new spec in headless mode causes a gui to ignore events. //return !BrowserImp.compare(bimp, new BrowserImp(ide.getIds())); Vector<String> diffs2 = BrowserImp.findAllDifferences(bimp, new BrowserImp(ide.getIds())); Vector<String> diffs1=BrowserImp.findAllDifferences(new BrowserImp(ide.getIds()),bimp); diffs1.addAll(diffs2); if (diffs1.size()>0) System.out.println("aqui"); return diffs1; } catch (UnknowFormat e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (DamagedFormat e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (CannotLoad e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return new Vector<String>(); }
private boolean differentContent() { try { Browser bimp=BrowserImp.initialise(watchedFile.getCanonicalPath()); ModelJGraph.enableAllListeners(); // a browser initialised through the initialise method is assumed to be //linked to no gui. Therefore, the persistence does load the spec without any listeners // and this prevents some runtime exception due to the event managers acting over elements in the specification // which were not layered out. This causes the listeners to be disabled by default, which is handled by // a static var. So, loading a new spec in headless mode causes a gui to ignore events. //return !BrowserImp.compare(bimp, new BrowserImp(ide.getIds())); Vector<String> diffs2 = BrowserImp.findAllDifferences(bimp, new BrowserImp(ide.getIds())); Vector<String> diffs1=BrowserImp.findAllDifferences(new BrowserImp(ide.getIds()),bimp); return !diffs2.isEmpty() || !diffs1.isEmpty(); } catch (UnknowFormat e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (DamagedFormat e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (CannotLoad e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return false; }
BrowserImp bimp=new BrowserImp(ids); bimp.getGraph(diagramPath); g = bimp.getGraph(diagramPath);