protected String getAddActionPath() { XModelObject o = helper.getModelObject(); XActionList l = (XActionList) o.getModelEntity().getActionList().getItem("CreateActions"); // $NON-NLS-1$ XActionItem[] is = l.getActionItems(); if (is.length != 1 || !(is[0] instanceof XAction)) return null; return "CreateActions" + "." + is[0].getName(); // $NON-NLS-1$ //$NON-NLS-2$ }
public boolean saveChildren(Element element, XModelObject o) { if ("FileSystemJar".equals(o.getModelEntity().getName())) { // $NON-NLS-1$ return true; } boolean b = super.saveChildren(element, o); if (b && isFileSystems(element.getNodeName())) { saveWorkspaceHomeAttr(element, o); XModelObject w = getWeb(o); if (w != null) save(element, w); } return b; }
protected void edit() { XModelObject o = helper.getModelObject(xtable.getSelectionIndex()); if (o == null) return; XActionList l = (XActionList) o.getModelEntity().getActionList(); if (l.getAction("Edit") != null) { // $NON-NLS-1$ callAction(o, "Edit"); // $NON-NLS-1$ } else if (l.getAction("EditActions.Edit") != null) { // $NON-NLS-1$ callAction(o, "EditActions.Edit"); // $NON-NLS-1$ } else { callAction(o, "Properties.Properties"); // $NON-NLS-1$ } }
public void saveTo(File f, XModelObject object) { XModelObject o = object.copy(1); XModelObject[] cs = o.getChildren(); for (XModelObject c : cs) { if (c.getModelEntity().getName().equals("FileSystemJar")) { // $NON-NLS-1$ o.removeChild(c); } if (!c.getAttributeValue(XModelObjectConstants.ATTR_NAME_LOCATION) .startsWith("%")) { // $NON-NLS-1$ o.removeChild(c); } } util().save(f, o); }
public void setInput(Object object) { selected = (XModelObject) object; String[] h = editor.getHelper().getHeader(); editor.getHelper().setEntity(selected.getModelEntity(), 0); if (h != editor.getHelper().getHeader()) { if (composite != null) { editor.getControl().dispose(); editor.createControl(composite); composite.setWeights(new int[] {15, 30}); composite.update(); composite.layout(); } } editor.setObject(selected); editor.update(); properties.setInput(selected); }