Author: scabanovich
Date: 2007-08-02 03:53:47 -0400 (Thu, 02 Aug 2007)
New Revision: 2831
Removed:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/ant/model/FileAntImpl.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/ant.meta
Log:
Obsolete class FileAntImpl removed
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2007-08-02
07:49:36 UTC (rev 2830)
+++
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2007-08-02
07:53:47 UTC (rev 2831)
@@ -219,12 +219,6 @@
FileANT_Properties.WindowTitle=Properties
FileANT_Properties.Title=File ANT
-AntTarget=/model/AntTarget.html
-
-AntTarget_Properties=/model/AntTarget_Properties.html
-AntTarget_Properties.WindowTitle=Properties
-AntTarget_Properties.Title=Target
-
##### Create File ANT #####
FileFolder_CreateFileANT=/model/CreateFile.html
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/ant.meta
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/ant.meta 2007-08-02
07:49:36 UTC (rev 2830)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/ant.meta 2007-08-02
07:53:47 UTC (rev 2831)
@@ -12,45 +12,11 @@
</MAPPINGS>
<ICONS/>
<GlobalActions kind="list"/>
- <XModelEntity ImplementingClass="%Regular%" name="AntTarget">
- <XChildrenEntities/>
- <XEntityRenderer>
- <ICONS>
- <ICON info="main.attribute" type="main"/>
- </ICONS>
- </XEntityRenderer>
- <XModelAttributes>
- <XModelAttribute default="target" loader="ElementType"
name="element type">
- <Constraint/>
- <Editor name="Uneditable"/>
- </XModelAttribute>
- <XModelAttribute name="name" xmlname="NAME">
- <Constraint/>
- <Editor name="Uneditable"/>
- </XModelAttribute>
- </XModelAttributes>
- <XActionItem kind="list">
- <XActionItem displayName="Run" kind="list"
name="RunActions">
- <XActionItem
-
HandlerClassName="org.jboss.tools.common.ant.model.handlers.RunTargetHandler"
- ICON="action.start" displayName="Run" kind="action"
name="Run"/>
- <XActionItem HIDE="disabled"
-
HandlerClassName="org.jboss.tools.common.model.engines.impl.StopProcessHandler"
- ICON="action.stop" displayName="Stop" kind="action"
name="Stop"/>
- </XActionItem>
- <XActionItem ICON="action.empty" kind="list"
name="Properties">
- <XActionItem HandlerClassName="%Properties%"
ICON="action.empty"
- displayName="Properties..." kind="action"
name="Properties"/>
- </XActionItem>
- </XActionItem>
- <XDependencies/>
- </XModelEntity>
<XModelEntity
ImplementationLoadingClass="org.jboss.tools.common.model.loaders.impl.BodyLoader"
ImplementingClass="org.jboss.tools.common.model.filesystems.impl.FileXMLImpl"
ObjectEditorClass="org.eclipse.ant.ui.internal.editor.AntEditor"
name="FileANT">
<XChildrenEntities>
- <XChildEntity name="AntTarget"/>
</XChildrenEntities>
<XEntityRenderer>
<ICONS>
Deleted:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/ant/model/FileAntImpl.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/ant/model/FileAntImpl.java 2007-08-02
07:49:36 UTC (rev 2830)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/ant/model/FileAntImpl.java 2007-08-02
07:53:47 UTC (rev 2831)
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.ant.model;
-
-import java.util.*;
-import org.jboss.tools.common.ant.parser.*;
-import org.jboss.tools.common.model.*;
-import org.jboss.tools.common.model.event.*;
-import org.jboss.tools.common.model.filesystems.*;
-import org.jboss.tools.common.model.filesystems.impl.*;
-
-public class FileAntImpl extends RecognizedFileImpl {
- private static final long serialVersionUID = 1L;
- private boolean loaded = false;
- private String[] targets = null;
-
- public FileAntImpl() {}
-
- public boolean hasChildren() {
- return true;
- }
-
- public boolean isValid() {
- return loaded && targets != null;
- }
-
- protected void loadChildren() {
- if(loaded || !isActive()) return;
- loaded = true;
- parse();
- if(targets == null) return;
- for (int i = 0; i < targets.length; i++) {
- try {
- Properties p = new Properties();
- p.setProperty("name", targets[i]);
- addChild_0(getModel().createModelObject("AntTarget", p));
- } catch (Exception e) {
- //ignore
- }
- }
- }
-
- private void parse() {
- if(targets != null) return;
- String b = getAttributeValue("body");
- try {
- targets = new AntParser(b).getTargets();
- } catch (Exception e) {
- //ignore
- targets = null;
- }
- }
-
- public void invalidate() {
- if(!loaded || getParent() == null) return;
- targets = null;
- parse();
- if(targets == null) return;
- children.clear();
- loaded = false;
- fireStructureChanged(XModelTreeEvent.STRUCTURE_CHANGED, getParent());
- }
-
- public void changeBody(String body) {
- getModel().changeObjectAttribute(this, "body", body);
- }
-
- public void set(String name, String value) {
- super.set(name, value);
- if("body".equals(name) && loaded) {
- invalidate();
- }
- }
-
- public XModelObject[] getChildrenForSave() {
- return new XModelObject[0];
- }
-
- public void setBodySource(BodySource bodysource) {
- super.setBodySource(bodysource);
- invalidate();
- }
-
-}