JBoss Tools SVN: r6523 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-22 05:15:40 -0500 (Fri, 22 Feb 2008)
New Revision: 6523
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
Log:
JBIDE-1803
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-02-22 10:15:10 UTC (rev 6522)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2008-02-22 10:15:40 UTC (rev 6523)
@@ -55,6 +55,7 @@
import org.jboss.tools.common.text.ext.IEditorWrapper;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.el.ElVarSearcher;
import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.w3c.dom.Node;
@@ -284,7 +285,8 @@
}
}
- List<String> suggestions = fEngine.getCompletions(seamProject, file, documentContent, prefix, offset + proposalPrefix.length() - prefix.length(), false, null);
+ List<ElVarSearcher.Var> vars = ElVarSearcher.findAllVars(viewer, offset);
+ List<String> suggestions = fEngine.getCompletions(seamProject, file, documentContent, prefix, offset + proposalPrefix.length() - prefix.length(), false, vars);
List<String> uniqueSuggestions = fEngine.makeUnique(suggestions);
List<ICompletionProposal> result= new ArrayList<ICompletionProposal>();
18 years, 1 month
JBoss Tools SVN: r6522 - in trunk/seam/plugins/org.jboss.tools.seam.core: src/org/jboss/tools/seam/internal/core/el and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-22 05:15:10 -0500 (Fri, 22 Feb 2008)
New Revision: 6522
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java
Log:
JBIDE-1803
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2008-02-22 09:49:46 UTC (rev 6521)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2008-02-22 10:15:10 UTC (rev 6522)
@@ -42,7 +42,8 @@
org.eclipse.jst.j2ee.ejb,
org.eclipse.jst.jsf.ui,
org.jboss.tools.jst.web,
- org.eclipse.ui.editors
+ org.eclipse.ui.editors,
+ org.eclipse.wst.sse.ui
Provide-Package: org.jboss.tools.seam.core,
org.jboss.tools.seam.internal.core,
org.jboss.tools.seam.internal.core.scanner,
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java 2008-02-22 09:49:46 UTC (rev 6521)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/ElVarSearcher.java 2008-02-22 10:15:10 UTC (rev 6522)
@@ -15,6 +15,9 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.w3c.dom.Element;
@@ -62,7 +65,32 @@
}
/**
+ * @param viewer
+ * @param offset
+ * @return
+ */
+ public static Node getNode(ITextViewer viewer, int offset) {
+ IndexedRegion treeNode = ContentAssistUtils.getNodeAt(viewer, offset);
+ if(treeNode instanceof Node) {
+ return (Node)treeNode;
+ }
+ return null;
+ }
+
+ /**
* @param node
+ * @return All var/value that can be used in this position and null if can't find anyone.
+ */
+ public static List<Var> findAllVars(ITextViewer viewer, int offset) {
+ Node node = getNode(viewer, offset);
+ if(node!=null) {
+ return findAllVars(node);
+ }
+ return null;
+ }
+
+ /**
+ * @param node
* @return All var/value that can be used in node and null if can't find anyone.
*/
public static List<Var> findAllVars(Node node) {
@@ -74,7 +102,7 @@
if(vars == null) {
vars = new ArrayList<Var>();
}
- vars.add(var);
+ vars.add(0, var);
}
parentNode = parentNode.getParentNode();
}
@@ -131,7 +159,7 @@
if(resolvedToken==null && parentVar.getElToken()!=null) {
try {
// Initialize parent vars.
- engine.resolveSeamELOperand(project, file, parentVar.getElToken().getText(), parentVar.getElToken().getText(), 0, true, parentVars, this);
+ engine.resolveSeamELOperand(project, file, var.getElToken().getText(), var.getElToken().getText(), 0, true, parentVars, this);
resolvedToken = parentVar.getResolvedElToken();
} catch (StringIndexOutOfBoundsException e) {
SeamCorePlugin.getPluginLog().logError(e);
18 years, 1 month
JBoss Tools SVN: r6521 - in trunk: common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-22 04:49:46 -0500 (Fri, 22 Feb 2008)
New Revision: 6521
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java
trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1810 Fixed
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java 2008-02-22 08:59:34 UTC (rev 6520)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java 2008-02-22 09:49:46 UTC (rev 6521)
@@ -271,6 +271,10 @@
return getTags(needResources, prefixName, tagName, tagMask);
}
+ if(startAttributeName<startTagName) {
+ return new ArrayList<KbProposal>();
+ }
+
String tagName = strQuery.substring(startTagName, startAttributeName);
startAttributeName+=KbQuery.ATTRIBUTE_SEPARATOR.length();
if(startAttributeName == strQuery.length()) {
Modified: trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java 2008-02-22 08:59:34 UTC (rev 6520)
+++ trunk/common/tests/org.jboss.tools.common.kb.test/src/org/jboss/tools/common/kb/test/KbQueriesTest.java 2008-02-22 09:49:46 UTC (rev 6521)
@@ -39,6 +39,18 @@
private JspWtpKbConnector connector = new JspWtpKbConnector();
/**
+ * Test for http://jira.jboss.com/jira/browse/JBIDE-1810
+ */
+ public void testJBIDE1810() {
+ String query = KbQuery.TAG_SEPARATOR + "html@xmlns:";
+ try {
+ connector.getProposals(query);
+ } catch (KbException e) {
+ fail("Fails during parsing query for \"xmlns\" attribute: " + e.getMessage());
+ }
+ }
+
+ /**
* Test for http://jira.jboss.com/jira/browse/JBIDE-1804
*/
public void testJBIDE1804() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-02-22 08:59:34 UTC (rev 6520)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-02-22 09:49:46 UTC (rev 6521)
@@ -250,25 +250,27 @@
} catch(Exception e) {
JspEditorPlugin.getPluginLog().logError(e);
}
- for (Iterator iter = kbProposals.iterator(); iter.hasNext();) {
- KbProposal kbProposal = cleanFaceletProposal((KbProposal)iter.next());
- String proposedInfo = kbProposal.getContextInfo();
- String replacementString = kbProposal.getReplacementString() + "=\"\"";
- String displayString = kbProposal.getLabel();
- AttrImpl attr = (AttrImpl)attributes.getNamedItem(displayString);
- if(attr!=null) {
- ITextRegion region = attr.getNameRegion();
- IStructuredDocumentRegion docRegion = contentAssistRequest.getDocumentRegion();
- if(docRegion.getStartOffset(region)>contentAssistRequest.getReplacementBeginPosition() ||
- docRegion.getEndOffset(region)< contentAssistRequest.getReplacementBeginPosition() + contentAssistRequest.getReplacementLength()) {
- continue;
+ if(kbProposals!=null) {
+ for (Iterator iter = kbProposals.iterator(); iter.hasNext();) {
+ KbProposal kbProposal = cleanFaceletProposal((KbProposal)iter.next());
+ String proposedInfo = kbProposal.getContextInfo();
+ String replacementString = kbProposal.getReplacementString() + "=\"\"";
+ String displayString = kbProposal.getLabel();
+ AttrImpl attr = (AttrImpl)attributes.getNamedItem(displayString);
+ if(attr!=null) {
+ ITextRegion region = attr.getNameRegion();
+ IStructuredDocumentRegion docRegion = contentAssistRequest.getDocumentRegion();
+ if(docRegion.getStartOffset(region)>contentAssistRequest.getReplacementBeginPosition() ||
+ docRegion.getEndOffset(region)< contentAssistRequest.getReplacementBeginPosition() + contentAssistRequest.getReplacementLength()) {
+ continue;
+ }
}
+ boolean autoContentAssistant = true;
+ int cursorAdjustment = replacementString.length() - 1;
+ Image image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
+ AutoContentAssistantProposal proposal = new AutoContentAssistantProposal(autoContentAssistant, replacementString, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), cursorAdjustment, image, displayString, null, proposedInfo, XMLRelevanceConstants.R_TAG_NAME);
+ contentAssistRequest.addProposal(proposal);
}
- boolean autoContentAssistant = true;
- int cursorAdjustment = replacementString.length() - 1;
- Image image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- AutoContentAssistantProposal proposal = new AutoContentAssistantProposal(autoContentAssistant, replacementString, contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), cursorAdjustment, image, displayString, null, proposedInfo, XMLRelevanceConstants.R_TAG_NAME);
- contentAssistRequest.addProposal(proposal);
}
addJsfAttributeNameProposalsForFaceletTag(contentAssistRequest);
super.addAttributeNameProposals(contentAssistRequest);
18 years, 1 month
JBoss Tools SVN: r6520 - trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-22 03:59:34 -0500 (Fri, 22 Feb 2008)
New Revision: 6520
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/FaceletsHtml.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1807
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/FaceletsHtml.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/FaceletsHtml.xml 2008-02-22 08:45:01 UTC (rev 6519)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/FaceletsHtml.xml 2008-02-22 08:59:34 UTC (rev 6520)
@@ -9158,6 +9158,9 @@
<proposal type="jsfVariables"/>
</attribute-type>
<attribute-type default="" name="src" required="false">
+ <proposal type="file">
+ <param name="extensions" value="%image%"/>
+ </proposal>
<proposal type="beanProperty"/>
<proposal type="bundleProperty"/>
<proposal type="jsfVariables"/>
18 years, 1 month
JBoss Tools SVN: r6519 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-02-22 03:45:01 -0500 (Fri, 22 Feb 2008)
New Revision: 6519
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-1811
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-02-22 05:03:23 UTC (rev 6518)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-02-22 08:45:01 UTC (rev 6519)
@@ -475,6 +475,8 @@
try {
String s = null;
String path = es[i].getPath().toString();
+
+ //First let's check if path is defined within Eclipse work space.
if(path.startsWith("/") && path.indexOf("/", 1) > 1) {
IResource findMember = ResourcesPlugin.getWorkspace().getRoot().findMember(es[i].getPath());
if(findMember != null) {
@@ -482,14 +484,22 @@
} else {
s = null;
}
- } else if(path.startsWith("/" + project.getName() + "/")) {
+ }
+
+ //If search in Eclipse work space has failed, this is a useless attempt, but
+ //let keep it just in case (this is good old code that worked for a long while).
+ if(s == null && path.startsWith("/" + project.getName() + "/")) {
IResource findMember = project.findMember(es[i].getPath().removeFirstSegments(1));
if(findMember != null) {
s = findMember.getLocation().toString();
} else {
s = null;
}
- } else if(new java.io.File(path).isFile()) {
+ }
+
+ //If we failed to find resource in Eclipse work space,
+ //lets try the path as absolute on disk
+ if(s == null && new java.io.File(path).isFile()) {
s = path;
}
if(s != null) {
18 years, 1 month
JBoss Tools SVN: r6518 - in trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model: internal and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-02-22 00:03:23 -0500 (Fri, 22 Feb 2008)
New Revision: 6518
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFileSet.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java
Log:
JBIDE-943 flatten support
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFileSet.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFileSet.java 2008-02-22 05:02:58 UTC (rev 6517)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveFileSet.java 2008-02-22 05:03:23 UTC (rev 6518)
@@ -37,6 +37,7 @@
public static final String INCLUDES_ATTRIBUTE = ATTRIBUTE_PREFIX + "includes";
public static final String EXCLUDES_ATTRIBUTE = ATTRIBUTE_PREFIX + "excludes";
public static final String IN_WORKSPACE_ATTRIBUTE = ATTRIBUTE_PREFIX + "inWorkspace";
+ public static final String FLATTENED_ATTRIBUTE = ATTRIBUTE_PREFIX + "flattened";
public static final String SOURCE_PATH_ATTRIBUTE = ATTRIBUTE_PREFIX + "sourcePath";
@@ -47,6 +48,11 @@
public boolean isInWorkspace();
/**
+ * @return Whether or not the fileset is flattened
+ */
+ public boolean isFlattened();
+
+ /**
* Returns the absolute file-system relative source path
* @return The path to the source folder ("basedir" in ant terminology) for this fileset.
*/
@@ -109,6 +115,11 @@
public void setInWorkspace(boolean isInWorkspace);
/**
+ * Sets whether or not this fileset is flattened.
+ */
+ public void setFlattened(boolean flattened);
+
+ /**
* Get the relative path of the input file to the root archive
* @param inputFile
* @return
@@ -122,7 +133,16 @@
*/
public IPath getPathRelativeToParent(IPath inputFile);
+ /**
+ * To be used if and when a specific new file is known to match
+ * @param file
+ */
public void addMatchingFile(IPath file);
+
+ /**
+ * To be used if and when a specific new file is known to match
+ * @param file
+ */
public void removeMatchingFile(IPath file);
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2008-02-22 05:02:58 UTC (rev 6517)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveFileSetImpl.java 2008-02-22 05:03:23 UTC (rev 6518)
@@ -42,9 +42,8 @@
public class ArchiveFileSetImpl extends ArchiveNodeImpl implements
IArchiveFileSet {
- private XbFileSet filesetDelegate;
private DirectoryScannerExtension scanner;
- private ArrayList matchingPaths;
+ private ArrayList<IPath> matchingPaths;
private boolean rescanRequired = true;
public ArchiveFileSetImpl() {
@@ -53,7 +52,6 @@
public ArchiveFileSetImpl (XbFileSet delegate) {
super(delegate);
- this.filesetDelegate = delegate;
}
@@ -73,35 +71,35 @@
*/
public synchronized IPath[] findMatchingPaths () {
getScanner(); // ensure up to date
- return matchingPaths == null ? new IPath[0] : (IPath[]) matchingPaths.toArray(new IPath[matchingPaths.size()]);
+ return matchingPaths == null ? new IPath[0] : matchingPaths.toArray(new IPath[matchingPaths.size()]);
}
/*
* @see IArchiveFileSet#getExcludesPattern()
*/
public String getExcludesPattern() {
- return filesetDelegate.getExcludes();
+ return getFileSetDelegate().getExcludes();
}
/*
* @see IArchiveFileSet#isInWorkspace()
*/
public boolean isInWorkspace() {
- return filesetDelegate.isInWorkspace();
+ return getFileSetDelegate().isInWorkspace();
}
/*
* @see IArchiveFileSet#getIncludesPattern()
*/
public String getIncludesPattern() {
- return filesetDelegate.getIncludes();
+ return getFileSetDelegate().getIncludes();
}
/*
* @see IArchiveFileSet#getGlobalSourcePath()
*/
public IPath getGlobalSourcePath() {
- String path = filesetDelegate.getDir();
+ String path = getFileSetDelegate().getDir();
if (path == null || path.equals(".") || path.equals("")) {
return getProjectPath();
} else if( isInWorkspace()){
@@ -115,9 +113,14 @@
* @see IArchiveFileSet#getSourcePath()
*/
public IPath getSourcePath() {
- return filesetDelegate.getDir() == null ? null : new Path(filesetDelegate.getDir());
+ return getFileSetDelegate().getDir() == null ?
+ null : new Path(getFileSetDelegate().getDir());
}
+ public boolean isFlattened() {
+ return getFileSetDelegate().isFlattened();
+ }
+
/*
* @see IArchiveFileSet#matchesPath(IPath)
*/
@@ -147,7 +150,7 @@
getGlobalSourcePath(), getIncludesPattern(), getExcludesPattern(), true);
// cache the paths
- ArrayList paths = new ArrayList();
+ ArrayList<IPath> paths = new ArrayList<IPath>();
IPath sp = getGlobalSourcePath();
String matched[] = scanner.getIncludedFiles();
for (int i = 0; i < matched.length; i++) {
@@ -174,7 +177,7 @@
*/
public void setExcludesPattern(String excludes) {
attributeChanged(EXCLUDES_ATTRIBUTE, getExcludesPattern(), excludes);
- filesetDelegate.setExcludes(excludes);
+ getFileSetDelegate().setExcludes(excludes);
rescanRequired = true;
}
@@ -183,7 +186,7 @@
*/
public void setIncludesPattern(String includes) {
attributeChanged(INCLUDES_ATTRIBUTE, getIncludesPattern(), includes);
- filesetDelegate.setIncludes(includes);
+ getFileSetDelegate().setIncludes(includes);
rescanRequired = true;
}
@@ -192,25 +195,36 @@
*/
public void setInWorkspace(boolean isInWorkspace) {
attributeChanged(IN_WORKSPACE_ATTRIBUTE, new Boolean(isInWorkspace()), new Boolean(isInWorkspace));
- filesetDelegate.setInWorkspace(isInWorkspace);
+ getFileSetDelegate().setInWorkspace(isInWorkspace);
rescanRequired = true;
}
/*
+ * (non-Javadoc)
+ * @see org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet#setFlattened(boolean)
+ */
+ public void setFlattened(boolean flat) {
+ attributeChanged(FLATTENED_ATTRIBUTE, new Boolean(isFlattened()), new Boolean(flat));
+ getFileSetDelegate().setFlattened(flat);
+ //TODO: rescanRequired = true;
+ }
+
+ /*
* @see IArchiveFileSet#setSourcePath(IPath, boolean)
*/
public void setSourcePath (IPath path) {
Assert.isNotNull(path);
IPath src = getSourcePath();
attributeChanged(SOURCE_PATH_ATTRIBUTE, src == null ? null : src.toString(), path == null ? null : path.toString());
- filesetDelegate.setDir(path.toString());
+ getFileSetDelegate().setDir(path.toString());
rescanRequired = true;
}
protected XbFileSet getFileSetDelegate () {
- return filesetDelegate;
+ return (XbFileSet)nodeDelegate;
}
+
/*
* filesets have no path of their own
* and should not be the parents of any other node
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java 2008-02-22 05:02:58 UTC (rev 6517)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XMLBinding.java 2008-02-22 05:03:23 UTC (rev 6518)
@@ -37,7 +37,6 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.internal.ArchiveImpl;
@@ -132,7 +131,7 @@
OutputStreamWriter writer = null;
try {
writer = new OutputStreamWriter(new FileOutputStream(filePath.toFile()));
- XMLBinding.marshall(element, writer, new NullProgressMonitor());
+ XMLBinding.marshall(element, writer, monitor);
} catch( Exception e ) {
}
finally {
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java 2008-02-22 05:02:58 UTC (rev 6517)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java 2008-02-22 05:03:23 UTC (rev 6518)
@@ -24,7 +24,8 @@
public class XbFileSet extends XbPackageNodeWithProperties {
private String dir, includes, excludes;
- private boolean inWorkspace, flattened;
+ private boolean inWorkspace;
+ private boolean flattened = false;
public XbFileSet ()
{
18 years, 1 month
JBoss Tools SVN: r6517 - in trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model: internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-02-22 00:02:58 -0500 (Fri, 22 Feb 2008)
New Revision: 6517
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNode.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java
Log:
Archives API recheck
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNode.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNode.java 2008-02-22 04:11:38 UTC (rev 6516)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/IArchiveNode.java 2008-02-22 05:02:58 UTC (rev 6517)
@@ -33,7 +33,7 @@
* @author <a href="rob.stryker(a)redhat.com">Rob Stryker</a>
* @version $Revision: 1929 $
*/
-public interface IArchiveNode extends IAdaptable {
+public interface IArchiveNode {
/**
* The node type that represents the model
*/
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java 2008-02-22 04:11:38 UTC (rev 6516)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveDeltaPreNodeFactory.java 2008-02-22 05:02:58 UTC (rev 6517)
@@ -71,7 +71,6 @@
protected static XbFileSet createFileset(ArchiveFileSetImpl postChange,HashMap attributeChanges, HashMap propertyChanges ) {
XbFileSet fs = new XbFileSet((XbFileSet)postChange.nodeDelegate);
-// fs.setDir("FILESET TEST CHANGE");
if( attributeChanges.containsKey(IArchiveFileSet.INCLUDES_ATTRIBUTE))
fs.setIncludes(getBeforeString(attributeChanges, IArchiveFileSet.INCLUDES_ATTRIBUTE));
if( attributeChanges.containsKey(IArchiveFileSet.EXCLUDES_ATTRIBUTE))
@@ -80,6 +79,8 @@
fs.setDir(getBeforeString(attributeChanges, IArchiveFileSet.SOURCE_PATH_ATTRIBUTE));
if( attributeChanges.containsKey(IArchiveFileSet.IN_WORKSPACE_ATTRIBUTE))
fs.setInWorkspace(getBeforeBoolean(attributeChanges, IArchiveFileSet.IN_WORKSPACE_ATTRIBUTE));
+ if( attributeChanges.containsKey(IArchiveFileSet.FLATTENED_ATTRIBUTE))
+ fs.setFlattened(getBeforeBoolean(attributeChanges, IArchiveFileSet.FLATTENED_ATTRIBUTE));
undoPropertyChanges(fs, propertyChanges);
return fs;
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java 2008-02-22 04:11:38 UTC (rev 6516)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveModelNode.java 2008-02-22 05:02:58 UTC (rev 6517)
@@ -94,9 +94,9 @@
return ArchivesModel.instance().containsRoot(this);
}
- /*
- * (non-Javadoc)
- * @see org.jboss.ide.eclipse.archives.core.model.internal.ArchiveNodeImpl#getParent()
+ /**
+ * No parent allowed for a model node
+ * @see IArchiveNode#setParent(IArchiveNode)
*/
public IArchiveNode getParent() {
return null;
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java 2008-02-22 04:11:38 UTC (rev 6516)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java 2008-02-22 05:02:58 UTC (rev 6517)
@@ -39,26 +39,31 @@
import org.jboss.ide.eclipse.archives.core.model.internal.xb.XbPackageNodeWithProperties;
import org.jboss.ide.eclipse.archives.core.model.internal.xb.XbPackages;
+/**
+ * Abstract superclass implementation for archive node types
+ * @author rob.stryker <rob.stryker(a)redhat.com>
+ *
+ */
public abstract class ArchiveNodeImpl implements IArchiveNode {
protected XbPackageNodeWithProperties nodeDelegate;
protected IArchiveNode parent;
- protected ArrayList children;
+ protected ArrayList<ArchiveNodeImpl> children;
- // cached data
- protected HashMap attributeChanges;
- protected HashMap propertyChanges;
- protected HashMap childChanges;
+ // cached data for deltas
+ protected HashMap<String, NodeDelta> attributeChanges;
+ protected HashMap<String, NodeDelta> propertyChanges;
+ protected HashMap<IArchiveNode, Integer> childChanges;
public ArchiveNodeImpl (XbPackageNodeWithProperties delegate) {
nodeDelegate = delegate;
- children = new ArrayList();
+ children = new ArrayList<ArchiveNodeImpl>();
// for deltas
- attributeChanges = new HashMap();
- propertyChanges = new HashMap();
- childChanges = new HashMap();
+ attributeChanges = new HashMap<String, NodeDelta>();
+ propertyChanges = new HashMap<String, NodeDelta>();
+ childChanges = new HashMap<IArchiveNode, Integer>();
}
public XbPackageNode getNodeDelegate() {
@@ -104,7 +109,7 @@
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveNode#getAllChildren()
*/
public IArchiveNode[] getAllChildren () {
- return (IArchiveNode[]) children.toArray(new IArchiveNode[children.size()]);
+ return children.toArray(new IArchiveNode[children.size()]);
}
/*
@@ -112,15 +117,15 @@
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveNode#getChildren(int)
*/
public IArchiveNode[] getChildren(int type) {
- ArrayList typedChildren = new ArrayList();
- for (Iterator iter = children.iterator(); iter.hasNext(); ) {
- IArchiveNode child = (IArchiveNode) iter.next();
+ ArrayList<IArchiveNode> typedChildren = new ArrayList<IArchiveNode>();
+ for (Iterator<ArchiveNodeImpl> iter = children.iterator(); iter.hasNext(); ) {
+ IArchiveNode child = iter.next();
if (child.getNodeType() == type) {
typedChildren.add(child);
}
}
- return (IArchiveNode[]) typedChildren.toArray(new IArchiveNode[typedChildren.size()]);
+ return typedChildren.toArray(new IArchiveNode[typedChildren.size()]);
}
/*
@@ -157,14 +162,9 @@
getParent().removeChild(this);
}
- if (parent != null && !(parent instanceof ArchiveModelNode)) {
- this.parent = parent;
- nodeDelegate.setParent(((ArchiveNodeImpl)parent).getNodeDelegate());
- } else if (getNodeType() == TYPE_ARCHIVE) {
- this.parent = parent;
- XbPackages packages = ArchivesModel.instance().getXbPackages(getProjectPath());
- nodeDelegate.setParent(packages);
- }
+ this.parent = parent;
+ nodeDelegate.setParent(parent == null ? null :
+ ((ArchiveNodeImpl)parent).getNodeDelegate());
}
/*
@@ -283,30 +283,14 @@
if( removed )
childChanges(node, IArchiveNodeDelta.CHILD_REMOVED);
}
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
- */
- public Object getAdapter(Class adapter) {
-// if (adapter.equals(IProject.class)) {
-// return getProjectPath();
-// } else if (adapter.equals(IArchiveNode.class)) {
-// return this;
-// }
-// else return null;
- return null;
- }
-
-
/*
* (non-Javadoc)
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveNode#connectedToModel()
*/
public boolean connectedToModel() {
IArchiveNode root = getRoot();
- return root instanceof ArchiveModelNode && ArchivesModel.instance().containsRoot((ArchiveModelNode)root);
+ return root != null && root.getNodeType() == TYPE_MODEL && ArchivesModel.instance().containsRoot((ArchiveModelNode)root);
}
@@ -315,13 +299,13 @@
*/
protected void attributeChanged(String key, Object beforeValue, Object afterValue) {
int kind = IArchiveNodeDelta.ATTRIBUTE_CHANGED;
- HashMap map = attributeChanges;
+ HashMap<String, NodeDelta> map = attributeChanges;
// short circuit if no change has REALLY occurred
if( beforeValue != null && beforeValue.equals(afterValue)) return;
if( map.containsKey(key)) {
- Object original = ((NodeDelta)map.get(key)).getBefore();
+ Object original = map.get(key).getBefore();
if( original == null && afterValue == null )
map.remove(key);
else if( original == null )
@@ -343,14 +327,14 @@
* A property has changed. Save the change so it can be represented in a delta
*/
protected void propertyChanged(String key, Object beforeValue, Object afterValue) {
- HashMap changeMap = propertyChanges;
+ HashMap<String, NodeDelta> changeMap = propertyChanges;
// short circuit if no change has REALLY occurred
if( beforeValue != null && beforeValue.equals(afterValue)) return;
if( changeMap.containsKey(key)) {
// element has already been added, removed, or changed since last save
- Object original = ((NodeDelta)changeMap.get(key)).getBefore();
+ Object original = changeMap.get(key).getBefore();
if( original == null && afterValue == null )
changeMap.remove(key);
else if( original == null )
@@ -381,7 +365,7 @@
*/
protected void childChanges(IArchiveNode node, int changeType) {
if( childChanges.containsKey(node)) {
- int lastChange = ((Integer)childChanges.get(node)).intValue();
+ int lastChange = childChanges.get(node).intValue();
if( lastChange == IArchiveNodeDelta.CHILD_ADDED && changeType == IArchiveNodeDelta.CHILD_REMOVED) {
childChanges.remove(node);
} else if( lastChange == IArchiveNodeDelta.CHILD_REMOVED && changeType == IArchiveNodeDelta.CHILD_ADDED) {
@@ -397,8 +381,8 @@
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveNode#getDelta()
*/
public IArchiveNodeDelta getDelta() {
- return new ArchiveNodeDeltaImpl(null, this, (HashMap)attributeChanges.clone(),
- (HashMap)propertyChanges.clone(), (HashMap)childChanges.clone());
+ return new ArchiveNodeDeltaImpl(null, this, (HashMap<String, NodeDelta>)attributeChanges.clone(),
+ (HashMap<String, NodeDelta>)propertyChanges.clone(), (HashMap<IArchiveNode, Integer>)childChanges.clone());
}
/**
@@ -409,7 +393,7 @@
propertyChanges.clear();
childChanges.clear();
- // clear children
+ // clear children recursively
IArchiveNode[] children = getAllChildren();
for( int i = 0; i < children.length; i++ )
((ArchiveNodeImpl)children[i]).clearDeltas();
18 years, 1 month
JBoss Tools SVN: r6516 - trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-02-21 23:11:38 -0500 (Thu, 21 Feb 2008)
New Revision: 6516
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbPackagesObjectProvider.java
Log:
JBIDE-943 flatten support pojo impl
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java 2008-02-22 02:27:05 UTC (rev 6515)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbFileSet.java 2008-02-22 04:11:38 UTC (rev 6516)
@@ -24,7 +24,7 @@
public class XbFileSet extends XbPackageNodeWithProperties {
private String dir, includes, excludes;
- private boolean inWorkspace;
+ private boolean inWorkspace, flattened;
public XbFileSet ()
{
@@ -44,6 +44,7 @@
this.includes = fileset.includes == null ? null : new String(fileset.includes);
this.excludes = fileset.excludes == null ? null : new String(fileset.excludes);
this.inWorkspace = fileset.inWorkspace;
+ this.flattened = fileset.flattened;
}
protected Object clone() throws CloneNotSupportedException {
@@ -81,4 +82,12 @@
public void setInWorkspace(boolean inWorkspace) {
this.inWorkspace = inWorkspace;
}
+
+ public boolean isFlattened() {
+ return flattened;
+ }
+
+ public void setFlattened(boolean flatten) {
+ this.flattened = flatten;
+ }
}
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbPackagesObjectProvider.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbPackagesObjectProvider.java 2008-02-22 02:27:05 UTC (rev 6515)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/xb/XbPackagesObjectProvider.java 2008-02-22 04:11:38 UTC (rev 6516)
@@ -80,6 +80,8 @@
return fileset.getExcludes();
else if ("inWorkspace".equals(localName))
return "" + fileset.isInWorkspace();
+ else if("flatten".equals(localName))
+ return "" + fileset.isFlattened();
}
else if (object instanceof XbProperty)
{
18 years, 1 month
JBoss Tools SVN: r6515 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-02-21 21:27:05 -0500 (Thu, 21 Feb 2008)
New Revision: 6515
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java
Log:
JBIDE-1709
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java 2008-02-22 02:17:38 UTC (rev 6514)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java 2008-02-22 02:27:05 UTC (rev 6515)
@@ -49,7 +49,7 @@
return main;
}
- public IPath getElementTwo() {
+ public IPath getResourceLocationIfExists() {
IAdaptable el = getElement();
return el == null ? null :
((IResource)el.getAdapter(IResource.class)).getLocation();
@@ -59,10 +59,10 @@
return ArchivesCore.getInstance().getPreferenceManager();
}
protected void fillValues() {
- if( getElementTwo() != null ) {
- overrideButton.setSelection(getPrefManager().areProjectSpecificPrefsEnabled(getElementTwo()));
+ if( getResourceLocationIfExists() != null ) {
+ overrideButton.setSelection(getPrefManager().areProjectSpecificPrefsEnabled(getResourceLocationIfExists()));
}
- automaticBuilder.setSelection(getPrefManager().isBuilderEnabled(getElementTwo()));
+ automaticBuilder.setSelection(getPrefManager().isBuilderEnabled(getResourceLocationIfExists()));
showAllProjects.setSelection(
PrefsInitializer.getBoolean(PrefsInitializer.PREF_SHOW_ALL_PROJECTS, getElement(), false));
showPackageOutputPath.setSelection(
@@ -82,7 +82,7 @@
}
protected void createOverridePrefs(Composite main) {
- if( getElementTwo() != null ) {
+ if( getResourceLocationIfExists() != null ) {
overrideComp = new Composite(main, SWT.NONE);
overrideComp.setLayout(new FillLayout());
overrideButton = new Button(overrideComp, SWT.CHECK);
@@ -165,7 +165,7 @@
showFullFilesetRootDir.setSelection(true);
showProjectRoot.setSelection(true);
showAllProjects.setSelection(false);
- if( getElementTwo() != null ) {
+ if( getResourceLocationIfExists() != null ) {
overrideButton.setSelection(false);
setWidgetsEnabled(overrideButton.getSelection());
} else {
@@ -174,10 +174,10 @@
}
public boolean performOk() {
- if( getElementTwo() != null ) {
- getPrefManager().setProjectSpecificPrefsEnabled(getElementTwo(), overrideButton.getSelection());
+ if( getResourceLocationIfExists() != null ) {
+ getPrefManager().setProjectSpecificPrefsEnabled(getResourceLocationIfExists(), overrideButton.getSelection());
}
- getPrefManager().setBuilderEnabled(getElementTwo(), automaticBuilder.getSelection());
+ getPrefManager().setBuilderEnabled(getResourceLocationIfExists(), automaticBuilder.getSelection());
PrefsInitializer.setBoolean(PrefsInitializer.PREF_SHOW_PACKAGE_OUTPUT_PATH, showPackageOutputPath.getSelection(), getElement());
PrefsInitializer.setBoolean(PrefsInitializer.PREF_SHOW_FULL_FILESET_ROOT_DIR, showFullFilesetRootDir.getSelection(), getElement());
PrefsInitializer.setBoolean(PrefsInitializer.PREF_SHOW_PROJECT_ROOT, showProjectRoot.getSelection(), getElement());
18 years, 1 month
JBoss Tools SVN: r6514 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-02-21 21:17:38 -0500 (Thu, 21 Feb 2008)
New Revision: 6514
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java
Log:
JBIDE-1709
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java 2008-02-21 21:19:29 UTC (rev 6513)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/preferences/MainPreferencePage.java 2008-02-22 02:17:38 UTC (rev 6514)
@@ -159,6 +159,20 @@
public void init(IWorkbench workbench) {
}
+ public void performDefaults() {
+ automaticBuilder.setSelection(true);
+ showPackageOutputPath.setSelection(true);
+ showFullFilesetRootDir.setSelection(true);
+ showProjectRoot.setSelection(true);
+ showAllProjects.setSelection(false);
+ if( getElementTwo() != null ) {
+ overrideButton.setSelection(false);
+ setWidgetsEnabled(overrideButton.getSelection());
+ } else {
+ setWidgetsEnabled(true);
+ }
+ }
+
public boolean performOk() {
if( getElementTwo() != null ) {
getPrefManager().setProjectSpecificPrefsEnabled(getElementTwo(), overrideButton.getSelection());
18 years, 1 month