<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
/******************************************************************** | /******************************************************************** | ||||
* Copyright (c) 2007 Contributors. All rights reserved. | |||||
* This program and the accompanying materials are made available | |||||
* under the terms of the Eclipse Public License v1.0 | |||||
* which accompanies this distribution and is available at | |||||
* http://eclipse.org/legal/epl-v10.html | |||||
* | |||||
* Contributors: IBM Corporation - initial API and implementation | |||||
* Copyright (c) 2007 Contributors. All rights reserved. | |||||
* This program and the accompanying materials are made available | |||||
* under the terms of the Eclipse Public License v1.0 | |||||
* which accompanies this distribution and is available at | |||||
* http://eclipse.org/legal/epl-v10.html | |||||
* | |||||
* Contributors: IBM Corporation - initial API and implementation | |||||
* Helen Hawkins - initial version (bug 148190) | * Helen Hawkins - initial version (bug 148190) | ||||
*******************************************************************/ | *******************************************************************/ | ||||
package org.aspectj.tools.ajbrowser.ui.swing; | package org.aspectj.tools.ajbrowser.ui.swing; | ||||
* Panel used to display messages from the message handler | * Panel used to display messages from the message handler | ||||
*/ | */ | ||||
public class MessageHandlerPanel extends JPanel { | public class MessageHandlerPanel extends JPanel { | ||||
private static final long serialVersionUID = -2251912345065588977L; | private static final long serialVersionUID = -2251912345065588977L; | ||||
private JScrollPane jScrollPane1 = new JScrollPane(); | private JScrollPane jScrollPane1 = new JScrollPane(); | ||||
private JList list; | private JList list; | ||||
return; | return; | ||||
} | } | ||||
createList(handler.getMessages()); | createList(handler.getMessages()); | ||||
try { | try { | ||||
jbInit(); | jbInit(); | ||||
} catch (Exception e) { | } catch (Exception e) { | ||||
e.printStackTrace(); | e.printStackTrace(); | ||||
} | |||||
} | |||||
list.setModel(listModel); | list.setModel(listModel); | ||||
MouseListener mouseListener = new MouseAdapter() { | MouseListener mouseListener = new MouseAdapter() { | ||||
list.setCellRenderer(new CompilerMessagesCellRenderer()); | list.setCellRenderer(new CompilerMessagesCellRenderer()); | ||||
setVisible(showPanel); | setVisible(showPanel); | ||||
} | } | ||||
private void createList(List messages) { | |||||
private void createList(List<IMessage> messages) { | |||||
list = new JList(); | list = new JList(); | ||||
listModel = new DefaultListModel(); | listModel = new DefaultListModel(); | ||||
for (Iterator iterator = messages.iterator(); iterator.hasNext();) { | |||||
for (Iterator<IMessage> iterator = messages.iterator(); iterator.hasNext();) { | |||||
listModel.addElement(iterator.next()); | listModel.addElement(iterator.next()); | ||||
} | } | ||||
} | } |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
/* ******************************************************************* | /* ******************************************************************* | ||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* 2002 Palo Alto Research Center, Incorporated (PARC). | * 2002 Palo Alto Research Center, Incorporated (PARC). | ||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* Xerox/PARC initial implementation | |||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* Xerox/PARC initial implementation | |||||
* ******************************************************************/ | * ******************************************************************/ | ||||
package org.aspectj.ajde.internal; | package org.aspectj.ajde.internal; | ||||
import java.util.List; | import java.util.List; | ||||
import org.aspectj.ajde.ui.BuildConfigModel; | import org.aspectj.ajde.ui.BuildConfigModel; | ||||
/** | |||||
/** | |||||
* @author Mik Kersten | * @author Mik Kersten | ||||
*/ | */ | ||||
public interface BuildConfigManager { | public interface BuildConfigManager { | ||||
public static final String CONFIG_FILE_SUFFIX = ".lst"; | public static final String CONFIG_FILE_SUFFIX = ".lst"; | ||||
public static final String DEFAULT_CONFIG_LABEL = "<all project files>"; | public static final String DEFAULT_CONFIG_LABEL = "<all project files>"; | ||||
/** | /** | ||||
* Returns the currently active build configuration file. The current active | |||||
* build configuration file that is set in this class is used for building and | |||||
* Returns the currently active build configuration file. The current active | |||||
* build configuration file that is set in this class is used for building and | |||||
* for updating the structure model. | * for updating the structure model. | ||||
* | |||||
* | |||||
* @return full path to the file | * @return full path to the file | ||||
*/ | */ | ||||
public String getActiveConfigFile(); | public String getActiveConfigFile(); | ||||
/** | /** | ||||
* Sets the currently active build configuration file. | * Sets the currently active build configuration file. | ||||
* | |||||
* | |||||
* @param full path to the file | * @param full path to the file | ||||
*/ | */ | ||||
public void setActiveConfigFile(String currConfigFilePath); | public void setActiveConfigFile(String currConfigFilePath); | ||||
* Remove a configuration listener. | * Remove a configuration listener. | ||||
*/ | */ | ||||
public void removeListener(BuildConfigListener configurationListener); | public void removeListener(BuildConfigListener configurationListener); | ||||
/** | /** | ||||
* Build a model for the corresponding configuration file. | * Build a model for the corresponding configuration file. | ||||
* | |||||
* | |||||
* @param full path to the file | * @param full path to the file | ||||
*/ | |||||
*/ | |||||
public BuildConfigModel buildModel(String configFilePath); | public BuildConfigModel buildModel(String configFilePath); | ||||
/** | /** | ||||
* Save the given configuration model to the file that it was generated from. | * Save the given configuration model to the file that it was generated from. | ||||
*/ | */ | ||||
public void writeModel(BuildConfigModel model); | public void writeModel(BuildConfigModel model); | ||||
/** | /** | ||||
* Write a list of source files into a configuration file. File paths will be | * Write a list of source files into a configuration file. File paths will be | ||||
* written relative to the path of the configuration file. | * written relative to the path of the configuration file. | ||||
*/ | |||||
*/ | |||||
public void writePaths(String configFilePath, List paths); | public void writePaths(String configFilePath, List paths); | ||||
/** | /** | ||||
* Add files to a configuration. | * Add files to a configuration. | ||||
* | |||||
* | |||||
* @param configFilePath full path to the configuration file | * @param configFilePath full path to the configuration file | ||||
* @param files list of full paths to the files to be added | * @param files list of full paths to the files to be added | ||||
*/ | */ | ||||
/** | /** | ||||
* Remove files from a configuration. | * Remove files from a configuration. | ||||
* | |||||
* | |||||
* @param configFilePath full path to the configuration file | * @param configFilePath full path to the configuration file | ||||
* @param files list of full paths to the files to be removed | * @param files list of full paths to the files to be removed | ||||
*/ | |||||
*/ | |||||
public void removeFilesFromConfig(String configFilePath, List files); | public void removeFilesFromConfig(String configFilePath, List files); | ||||
/** | /** | ||||
* @return list (of Strings) of all build configuration files | * @return list (of Strings) of all build configuration files | ||||
* found so far | * found so far | ||||
*/ | */ | ||||
public List /*String*/ getAllBuildConfigFiles(); | public List /*String*/ getAllBuildConfigFiles(); | ||||
} | |||||
} |
/* ******************************************************************* | /* ******************************************************************* | ||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* 2002 Palo Alto Research Center, Incorporated (PARC). | * 2002 Palo Alto Research Center, Incorporated (PARC). | ||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* Xerox/PARC initial implementation | |||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* Xerox/PARC initial implementation | |||||
* Helen Hawkins Converted to new interface (bug 148190) | * Helen Hawkins Converted to new interface (bug 148190) | ||||
* ******************************************************************/ | * ******************************************************************/ | ||||
// }; | // }; | ||||
// model.getRoot().walk(walker); | // model.getRoot().walk(walker); | ||||
List activeSourceFiles = model.getActiveNodes(BuildConfigNode.Kind.FILE_ASPECTJ); | |||||
List<BuildConfigNode> activeSourceFiles = model.getActiveNodes(BuildConfigNode.Kind.FILE_ASPECTJ); | |||||
activeSourceFiles.addAll(model.getActiveNodes(BuildConfigNode.Kind.FILE_JAVA)); | activeSourceFiles.addAll(model.getActiveNodes(BuildConfigNode.Kind.FILE_JAVA)); | ||||
List activeImportedFiles = model.getActiveNodes(BuildConfigNode.Kind.FILE_LST); | |||||
List<BuildConfigNode> activeImportedFiles = model.getActiveNodes(BuildConfigNode.Kind.FILE_LST); | |||||
fileUpdater.writeConfigFile(model.getSourceFile(), activeSourceFiles, activeImportedFiles); | fileUpdater.writeConfigFile(model.getSourceFile(), activeSourceFiles, activeImportedFiles); | ||||
} | } | ||||
} | } | ||||
private boolean pruneEmptyDirs(BuildConfigNode node) { | private boolean pruneEmptyDirs(BuildConfigNode node) { | ||||
List nodesToRemove = new ArrayList(); | |||||
for (Iterator it = node.getChildren().iterator(); it.hasNext();) { | |||||
BuildConfigNode currNode = (BuildConfigNode) it.next(); | |||||
List<BuildConfigNode> nodesToRemove = new ArrayList<>(); | |||||
for (Iterator<BuildConfigNode> it = node.getChildren().iterator(); it.hasNext();) { | |||||
BuildConfigNode currNode = it.next(); | |||||
boolean hasValidChildren = pruneEmptyDirs(currNode); | boolean hasValidChildren = pruneEmptyDirs(currNode); | ||||
if (!currNode.isValidResource() && !hasValidChildren) { | if (!currNode.isValidResource() && !hasValidChildren) { | ||||
nodesToRemove.add(currNode); | nodesToRemove.add(currNode); | ||||
} | } | ||||
} | } | ||||
for (Iterator it = nodesToRemove.iterator(); it.hasNext();) { | |||||
BuildConfigNode currNode = (BuildConfigNode) it.next(); | |||||
for (Iterator<BuildConfigNode> it = nodesToRemove.iterator(); it.hasNext();) { | |||||
BuildConfigNode currNode = it.next(); | |||||
node.removeChild(currNode); | node.removeChild(currNode); | ||||
} | } | ||||
return node.getChildren().size() > 0; | return node.getChildren().size() > 0; | ||||
// } | // } | ||||
// } | // } | ||||
// | // | ||||
private void sortModel(BuildConfigNode node, Comparator comparator) { | |||||
private void sortModel(BuildConfigNode node, Comparator<BuildConfigNode> comparator) { | |||||
if (node == null || node.getChildren() == null) | if (node == null || node.getChildren() == null) | ||||
return; | return; | ||||
Collections.sort(node.getChildren(), comparator); | Collections.sort(node.getChildren(), comparator); | ||||
for (Iterator it = node.getChildren().iterator(); it.hasNext();) { | |||||
BuildConfigNode nextNode = (BuildConfigNode) it.next(); | |||||
for (Iterator<BuildConfigNode> it = node.getChildren().iterator(); it.hasNext();) { | |||||
BuildConfigNode nextNode = it.next(); | |||||
if (nextNode != null) | if (nextNode != null) | ||||
sortModel(nextNode, comparator); | sortModel(nextNode, comparator); | ||||
} | } | ||||
} | } | ||||
private static final Comparator ALPHABETICAL_COMPARATOR = new Comparator() { | |||||
public int compare(Object o1, Object o2) { | |||||
BuildConfigNode n1 = (BuildConfigNode) o1; | |||||
BuildConfigNode n2 = (BuildConfigNode) o2; | |||||
private static final Comparator<BuildConfigNode> ALPHABETICAL_COMPARATOR = new Comparator<BuildConfigNode>() { | |||||
public int compare(BuildConfigNode n1, BuildConfigNode n2) { | |||||
return n1.getName().compareTo(n2.getName()); | return n1.getName().compareTo(n2.getName()); | ||||
} | } | ||||
}; | }; |
/* ******************************************************************* | /* ******************************************************************* | ||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* 2002 Palo Alto Research Center, Incorporated (PARC). | * 2002 Palo Alto Research Center, Incorporated (PARC). | ||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* Xerox/PARC initial implementation | |||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* Xerox/PARC initial implementation | |||||
* ******************************************************************/ | * ******************************************************************/ | ||||
package org.aspectj.ajde.ui; | package org.aspectj.ajde.ui; | ||||
import java.io.ObjectStreamException; | import java.io.ObjectStreamException; | ||||
import java.util.*; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
import org.aspectj.asm.*; | |||||
import org.aspectj.asm.IProgramElement; | |||||
import org.aspectj.asm.IRelationship; | |||||
/** | |||||
/** | |||||
* Nested properties use the typesafe enum pattern. | * Nested properties use the typesafe enum pattern. | ||||
* | |||||
* | |||||
* @author Mik Kersten | * @author Mik Kersten | ||||
*/ | */ | ||||
public class StructureViewProperties { | public class StructureViewProperties { | ||||
/** | /** | ||||
* @deprecated | * @deprecated | ||||
*/ | */ | ||||
public static final String SORT_DECLARATIONAL = StructureViewProperties.Sorting.DECLARATIONAL.toString(); | public static final String SORT_DECLARATIONAL = StructureViewProperties.Sorting.DECLARATIONAL.toString(); | ||||
/** | /** | ||||
* @deprecated | * @deprecated | ||||
*/ | |||||
*/ | |||||
public void setSorting(String sorting) { } | public void setSorting(String sorting) { } | ||||
private List relations = new ArrayList(); | |||||
private List filteredMemberAccessibility = new ArrayList(); | |||||
private List filteredMemberModifiers = new ArrayList(); | |||||
private List filteredMemberKinds = new ArrayList(); | |||||
private List grouping = new ArrayList(); | |||||
private List<IRelationship.Kind> relations = new ArrayList<>(); | |||||
private List<IProgramElement.Accessibility> filteredMemberAccessibility = new ArrayList<>(); | |||||
private List<IProgramElement.Modifiers> filteredMemberModifiers = new ArrayList<>(); | |||||
private List<IProgramElement.Kind> filteredMemberKinds = new ArrayList<>(); | |||||
private List<Grouping> grouping = new ArrayList<>(); | |||||
private Sorting sorting = Sorting.DECLARATIONAL; | private Sorting sorting = Sorting.DECLARATIONAL; | ||||
private Granularity granularity = StructureViewProperties.Granularity.DECLARED_ELEMENTS; | private Granularity granularity = StructureViewProperties.Granularity.DECLARED_ELEMENTS; | ||||
public List getRelations() { | public List getRelations() { | ||||
return relations; | return relations; | ||||
} | } | ||||
public void setRelations(List relations) { | public void setRelations(List relations) { | ||||
this.relations = relations; | |||||
this.relations = relations; | |||||
} | } | ||||
public void addRelation(IRelationship.Kind kind) { | public void addRelation(IRelationship.Kind kind) { | ||||
public void addFilteredMemberAccessibility(IProgramElement.Accessibility accessibility) { | public void addFilteredMemberAccessibility(IProgramElement.Accessibility accessibility) { | ||||
this.filteredMemberAccessibility.add(accessibility); | this.filteredMemberAccessibility.add(accessibility); | ||||
} | } | ||||
public void removeFilteredMemberAccessibility(IProgramElement.Accessibility accessibility) { | public void removeFilteredMemberAccessibility(IProgramElement.Accessibility accessibility) { | ||||
this.filteredMemberAccessibility.remove(accessibility); | |||||
this.filteredMemberAccessibility.remove(accessibility); | |||||
} | } | ||||
public List getFilteredMemberModifiers() { | public List getFilteredMemberModifiers() { | ||||
public void setFilteredMemberModifiers(List memberModifiers) { | public void setFilteredMemberModifiers(List memberModifiers) { | ||||
this.filteredMemberModifiers = memberModifiers; | this.filteredMemberModifiers = memberModifiers; | ||||
} | } | ||||
public void addFilteredMemberModifiers(IProgramElement.Modifiers modifiers) { | public void addFilteredMemberModifiers(IProgramElement.Modifiers modifiers) { | ||||
this.filteredMemberModifiers.add(modifiers); | this.filteredMemberModifiers.add(modifiers); | ||||
} | } | ||||
public void removeFilteredMemberModifiers(IProgramElement.Modifiers modifiers) { | public void removeFilteredMemberModifiers(IProgramElement.Modifiers modifiers) { | ||||
this.filteredMemberModifiers.remove(modifiers); | |||||
this.filteredMemberModifiers.remove(modifiers); | |||||
} | } | ||||
public StructureViewProperties.Sorting getSorting() { | public StructureViewProperties.Sorting getSorting() { | ||||
return sorting; | return sorting; | ||||
} | } | ||||
public void setSorting(StructureViewProperties.Sorting sorting) { | public void setSorting(StructureViewProperties.Sorting sorting) { | ||||
this.sorting = sorting; | this.sorting = sorting; | ||||
} | } | ||||
public List getFilteredMemberKinds() { | public List getFilteredMemberKinds() { | ||||
return filteredMemberKinds; | return filteredMemberKinds; | ||||
} | } | ||||
public void setFilteredMemberKinds(List memberKinds) { | public void setFilteredMemberKinds(List memberKinds) { | ||||
this.filteredMemberKinds = memberKinds; | this.filteredMemberKinds = memberKinds; | ||||
} | } | ||||
public void addFilteredMemberKind(IProgramElement.Kind kind) { | public void addFilteredMemberKind(IProgramElement.Kind kind) { | ||||
this.filteredMemberKinds.add(kind); | this.filteredMemberKinds.add(kind); | ||||
} | } | ||||
public void removeFilteredMemberKind(IProgramElement.Kind kind) { | public void removeFilteredMemberKind(IProgramElement.Kind kind) { | ||||
this.filteredMemberKinds.remove(kind); | |||||
this.filteredMemberKinds.remove(kind); | |||||
} | } | ||||
public List getGrouping() { | public List getGrouping() { | ||||
return grouping; | return grouping; | ||||
} | } | ||||
public void setGrouping(List grouping) { | public void setGrouping(List grouping) { | ||||
this.grouping = grouping; | this.grouping = grouping; | ||||
} | } | ||||
public void addGrouping(Grouping grouping) { | public void addGrouping(Grouping grouping) { | ||||
this.grouping.add(grouping); | this.grouping.add(grouping); | ||||
} | } | ||||
public void setGranularity(Granularity granularity) { | public void setGranularity(Granularity granularity) { | ||||
this.granularity = granularity; | this.granularity = granularity; | ||||
} | } | ||||
public String getName() { | public String getName() { | ||||
return "<unnamed view>"; | return "<unnamed view>"; | ||||
} | } | ||||
public String toString() { | public String toString() { | ||||
return "\nView Properties:" | return "\nView Properties:" | ||||
+ "\n-> sorting: " + sorting | |||||
+ "\n-> sorting: " + sorting | |||||
+ "\n-> grouping: " + grouping | + "\n-> grouping: " + grouping | ||||
+ "\n-> filtered member kinds: " + filteredMemberKinds | + "\n-> filtered member kinds: " + filteredMemberKinds | ||||
+ "\n-> filtered member accessibility: " + filteredMemberAccessibility | + "\n-> filtered member accessibility: " + filteredMemberAccessibility | ||||
+ "\n-> filtered member modifiers: " + filteredMemberModifiers | + "\n-> filtered member modifiers: " + filteredMemberModifiers | ||||
+ "\n-> relations: " + relations; | + "\n-> relations: " + relations; | ||||
} | } | ||||
public static class Hierarchy { | public static class Hierarchy { | ||||
public static final Hierarchy DECLARATION = new Hierarchy("package hierarchy"); | public static final Hierarchy DECLARATION = new Hierarchy("package hierarchy"); | ||||
public static final Hierarchy CROSSCUTTING = new Hierarchy("crosscutting structure"); | public static final Hierarchy CROSSCUTTING = new Hierarchy("crosscutting structure"); | ||||
public static final Hierarchy INHERITANCE = new Hierarchy("type hierarchy"); | public static final Hierarchy INHERITANCE = new Hierarchy("type hierarchy"); | ||||
public static final Hierarchy[] ALL = { DECLARATION, CROSSCUTTING, INHERITANCE }; | public static final Hierarchy[] ALL = { DECLARATION, CROSSCUTTING, INHERITANCE }; | ||||
private final String name; | private final String name; | ||||
private Hierarchy(String name) { | private Hierarchy(String name) { | ||||
this.name = name; | this.name = name; | ||||
} | } | ||||
public String toString() { | public String toString() { | ||||
return name; | return name; | ||||
} | |||||
} | |||||
// The 4 declarations below are necessary for serialization | // The 4 declarations below are necessary for serialization | ||||
private static int nextOrdinal = 0; | private static int nextOrdinal = 0; | ||||
return ALL[ordinal]; | return ALL[ordinal]; | ||||
} | } | ||||
} | } | ||||
public static class Grouping { | public static class Grouping { | ||||
public static final Grouping KIND = new Grouping("group by kind"); | public static final Grouping KIND = new Grouping("group by kind"); | ||||
public static final Grouping VISIBILITY = new Grouping("group by visibility"); | public static final Grouping VISIBILITY = new Grouping("group by visibility"); | ||||
public static final Grouping[] ALL = { KIND, VISIBILITY }; | public static final Grouping[] ALL = { KIND, VISIBILITY }; | ||||
private final String name; | private final String name; | ||||
private Grouping(String name) { | private Grouping(String name) { | ||||
this.name = name; | this.name = name; | ||||
} | } | ||||
public String toString() { | public String toString() { | ||||
return name; | return name; | ||||
} | |||||
} | |||||
// The 4 declarations below are necessary for serialization | // The 4 declarations below are necessary for serialization | ||||
private static int nextOrdinal = 0; | private static int nextOrdinal = 0; | ||||
return ALL[ordinal]; | return ALL[ordinal]; | ||||
} | } | ||||
} | } | ||||
public static class Sorting { | public static class Sorting { | ||||
public static final Sorting ALPHABETICAL = new Sorting("sort alphabetically"); | public static final Sorting ALPHABETICAL = new Sorting("sort alphabetically"); | ||||
public static final Sorting DECLARATIONAL = new Sorting("sort declarationally"); | public static final Sorting DECLARATIONAL = new Sorting("sort declarationally"); | ||||
public static final Sorting[] ALL = { ALPHABETICAL, DECLARATIONAL }; | public static final Sorting[] ALL = { ALPHABETICAL, DECLARATIONAL }; | ||||
private final String name; | private final String name; | ||||
private Sorting(String name) { | private Sorting(String name) { | ||||
this.name = name; | this.name = name; | ||||
} | } | ||||
public String toString() { | public String toString() { | ||||
return name; | return name; | ||||
} | |||||
} | |||||
// The 4 declarations below are necessary for serialization | // The 4 declarations below are necessary for serialization | ||||
private static int nextOrdinal = 0; | private static int nextOrdinal = 0; | ||||
return ALL[ordinal]; | return ALL[ordinal]; | ||||
} | } | ||||
} | } | ||||
public static class Granularity { | public static class Granularity { | ||||
public static final Granularity PACKAGE = new Granularity("package"); | public static final Granularity PACKAGE = new Granularity("package"); | ||||
public static final Granularity FILE = new Granularity("file"); | public static final Granularity FILE = new Granularity("file"); | ||||
public static final Granularity TYPE = new Granularity("type"); | public static final Granularity TYPE = new Granularity("type"); | ||||
public static final Granularity MEMBER = new Granularity("member"); | public static final Granularity MEMBER = new Granularity("member"); | ||||
public static final Granularity DECLARED_ELEMENTS = new Granularity("declared body elements"); | public static final Granularity DECLARED_ELEMENTS = new Granularity("declared body elements"); | ||||
public static final Granularity[] ALL = { PACKAGE, FILE, TYPE, MEMBER, DECLARED_ELEMENTS }; | public static final Granularity[] ALL = { PACKAGE, FILE, TYPE, MEMBER, DECLARED_ELEMENTS }; | ||||
private final String name; | private final String name; | ||||
private Granularity(String name) { | private Granularity(String name) { | ||||
this.name = name; | this.name = name; | ||||
} | } | ||||
public String toString() { | public String toString() { | ||||
return name; | return name; | ||||
} | |||||
} | |||||
// The 4 declarations below are necessary for serialization | // The 4 declarations below are necessary for serialization | ||||
private static int nextOrdinal = 0; | private static int nextOrdinal = 0; |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>aspectjrt</artifactId> | <artifactId>aspectjrt</artifactId> |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>aspectjtools</artifactId> | <artifactId>aspectjtools</artifactId> |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>aspectjweaver</artifactId> | <artifactId>aspectjweaver</artifactId> |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>installer</artifactId> | <artifactId>installer</artifactId> |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
/* ******************************************************************* | /* ******************************************************************* | ||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* Copyright (c) 1999-2001 Xerox Corporation, | |||||
* 2002 Palo Alto Research Center, Incorporated (PARC). | * 2002 Palo Alto Research Center, Incorporated (PARC). | ||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* PARC initial implementation | |||||
* All rights reserved. | |||||
* This program and the accompanying materials are 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: | |||||
* PARC initial implementation | |||||
* ******************************************************************/ | * ******************************************************************/ | ||||
package org.aspectj.ajdt.internal.core.builder; | package org.aspectj.ajdt.internal.core.builder; | ||||
print("("); | print("("); | ||||
print(") "); | print(") "); | ||||
print("("); | print("("); | ||||
Iterator it3 = node.getChildren().iterator(); | |||||
Iterator<IProgramElement> it3 = node.getChildren().iterator(); | |||||
if (it3.hasNext()) { | if (it3.hasNext()) { | ||||
while (it3.hasNext()) { | while (it3.hasNext()) { | ||||
// this ignores relations on the compile unit | // this ignores relations on the compile unit |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<configuration> | <configuration> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>org.eclipse.jdt.core</artifactId> | <artifactId>org.eclipse.jdt.core</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<packaging>jar</packaging> | <packaging>jar</packaging> | ||||
<file>${basedir}/jdtcore-for-aspectj.jar</file> | <file>${basedir}/jdtcore-for-aspectj.jar</file> | ||||
<createChecksum>true</createChecksum> | <createChecksum>true</createChecksum> | ||||
<configuration> | <configuration> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>org.eclipse.jdt.core</artifactId> | <artifactId>org.eclipse.jdt.core</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<packaging>jar</packaging> | <packaging>jar</packaging> | ||||
<file>${basedir}/jdtcore-for-aspectj-src.zip</file> | <file>${basedir}/jdtcore-for-aspectj-src.zip</file> | ||||
<createChecksum>true</createChecksum> | <createChecksum>true</createChecksum> |
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<packaging>pom</packaging> | <packaging>pom</packaging> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<name>AspectJ Parent Project</name> | <name>AspectJ Parent Project</name> | ||||
<modules> | <modules> |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>util</artifactId> | <artifactId>util</artifactId> |
<parent> | <parent> | ||||
<groupId>org.aspectj</groupId> | <groupId>org.aspectj</groupId> | ||||
<artifactId>aspectj-parent</artifactId> | <artifactId>aspectj-parent</artifactId> | ||||
<version>1.9.4</version> | |||||
<version>1.9.5.BUILD-SNAPSHOT</version> | |||||
<relativePath>..</relativePath> | <relativePath>..</relativePath> | ||||
</parent> | </parent> | ||||