Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-07-16 04:25:43 -0400
committerAlexander Kurtakov2019-07-16 04:25:43 -0400
commit4e49da3ba9a9f4a8edb89c72aa402e3757d5cd48 (patch)
tree9d1e269ef14b23e053b5b9b7010c75a088ce787e
parent1139fc56935d12b70b4aa796b3bb1dc4eca459eb (diff)
downloadrt.equinox.p2-4e49da3ba9a9f4a8edb89c72aa402e3757d5cd48.tar.gz
rt.equinox.p2-4e49da3ba9a9f4a8edb89c72aa402e3757d5cd48.tar.xz
rt.equinox.p2-4e49da3ba9a9f4a8edb89c72aa402e3757d5cd48.zip
Remove useless non-javadoc comments.
Change-Id: I8344b55fde0515c8b64c576017a692108e4cadd7 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/XZedSimpleArtifactRepositoryFactory.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java11
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java21
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java98
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java64
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java39
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java17
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java99
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java84
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java84
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java124
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java8
19 files changed, 389 insertions, 379 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
index a0514901d..b22a503a2 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/BlobStore.java
@@ -57,7 +57,7 @@ public class BlobStore {
return new FileOutputStream(URIUtil.toFile(fileFor(uuid)));
}
- /* (non-Javadoc)
+ /*
* @see UniversalUniqueIdentifier#appendByteString(StringBuffer, byte)
*/
private void appendByteString(StringBuffer buffer, byte value) {
@@ -71,15 +71,15 @@ public class BlobStore {
buffer.append(hexString);
}
- /* (non-Javadoc)
+ /*
* Converts an array of bytes into a String.
*
* @see UniversalUniqueIdentifier#toString()
*/
private String bytesToHexString(byte[] b) {
StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < b.length; i++)
- appendByteString(buffer, b[i]);
+ for (byte element : b)
+ appendByteString(buffer, element);
return buffer.toString();
}
@@ -123,8 +123,8 @@ public class BlobStore {
*/
protected byte hashUUIDbytes(byte[] uuid) {
byte hash = 0;
- for (int i = 0; i < uuid.length; i++)
- hash ^= randomArray[uuid[i] + 128]; // +128 makes sure the index is >0
+ for (byte element : uuid)
+ hash ^= randomArray[element + 128]; // +128 makes sure the index is >0
return hash;
}
}
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/XZedSimpleArtifactRepositoryFactory.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/XZedSimpleArtifactRepositoryFactory.java
index 945132d19..3a185b96f 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/XZedSimpleArtifactRepositoryFactory.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/XZedSimpleArtifactRepositoryFactory.java
@@ -72,8 +72,10 @@ public class XZedSimpleArtifactRepositoryFactory extends ArtifactRepositoryFacto
return localFile;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load(java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
+ /*
+ * @see
+ * org.eclipse.equinox.p2.repository.metadata.spi.MetadataRepositoryFactory#load
+ * (java.net.URL, org.eclipse.core.runtime.IProgressMonitor)
*/
public IArtifactRepository load(URI location, int flags, IProgressMonitor monitor, boolean acquireLock) throws ProvisionException {
long time = 0;
diff --git a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
index fad832d6b..90f280269 100644
--- a/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.director.app/src/org/eclipse/equinox/internal/p2/director/app/DirectorApplication.java
@@ -649,12 +649,11 @@ public class DirectorApplication implements IApplication, ProvisioningListener {
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener#notify(java.util.EventObject)
- *
- * See bug: https://bugs.eclipse.org/340971
- * Using the event bus to detect whether or not a repository was added in a touchpoint action.
- * If it was, then (if it exists) remove it from our list of repos to remove after we complete our install.
+ /*
+ * See bug: https://bugs.eclipse.org/340971 Using the event bus to detect
+ * whether or not a repository was added in a touchpoint action. If it was, then
+ * (if it exists) remove it from our list of repos to remove after we complete
+ * our install.
*/
@Override
public void notify(EventObject o) {
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
index ecb329b01..0c24da5e3 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/ProfilePreferences.java
@@ -116,7 +116,6 @@ public class ProfilePreferences extends EclipsePreferences {
}
/*
- * (non-Javadoc)
* Create an Engine phase to save profile preferences
*/
protected void doSave(IProvisioningAgent agent) throws BackingStoreException {
@@ -248,7 +247,6 @@ public class ProfilePreferences extends EclipsePreferences {
}
/*
- * (non-Javadoc)
* Create an Engine phase to load profile preferences
*/
@Override
diff --git a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
index a4697f17b..c9527e20a 100644
--- a/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
+++ b/bundles/org.eclipse.equinox.p2.engine/src/org/eclipse/equinox/internal/p2/engine/SimpleProfileRegistry.java
@@ -898,9 +898,6 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
return true;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.engine.IProfileRegistry#containsProfile(java.lang.String)
- */
@Override
public synchronized boolean containsProfile(String id) {
if (SELF.equals(id))
@@ -953,17 +950,11 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
return profileDataArea;
}
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#start()
- */
@Override
public void start() {
//nothing to do
}
- /*(non-Javadoc)
- * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop()
- */
@Override
public void stop() {
try {
@@ -1106,9 +1097,6 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
return new Status(IStatus.ERROR, EngineActivator.ID, (NLS.bind(Messages.SimpleProfileRegistry_state_not_found, timestamp, id)));
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProfileRegistry#setProfileStateProperties(java.lang.String, long, java.util.Map)
- */
@Override
public IStatus setProfileStateProperties(String id, long timestamp, Map<String, String> propertiesToAdd) {
if (id == null || propertiesToAdd == null)
@@ -1143,9 +1131,6 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
return Status.OK_STATUS;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProfileRegistry#setProfileStateProperty(java.lang.String, long, java.lang.String, java.lang.String)
- */
@Override
public IStatus setProfileStateProperty(String id, long timestamp, String key, String value) {
if (id == null)
@@ -1200,9 +1185,6 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
return result;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProfileRegistry#getProfileStateProperties(java.lang.String, java.lang.String)
- */
@Override
public Map<String, String> getProfileStateProperties(String id, String userKey) {
if (id == null || userKey == null)
@@ -1240,9 +1222,6 @@ public class SimpleProfileRegistry implements IProfileRegistry, IAgentService {
return result;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.p2.engine.IProfileRegistry#removeProfileStateProperties(java.lang.String, long, java.util.Collection)
- */
@Override
public IStatus removeProfileStateProperties(String id, long timestamp, Collection<String> keys) {
if (id == null)
diff --git a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
index 1e784afad..5fdc16ec6 100644
--- a/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
+++ b/bundles/org.eclipse.equinox.p2.ui.admin/src/org/eclipse/equinox/internal/p2/ui/admin/ArtifactRepositoryTracker.java
@@ -47,7 +47,8 @@ public class ArtifactRepositoryTracker extends RepositoryTracker {
if (nickname != null)
getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
} finally {
- ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_ARTIFACT, RepositoryEvent.ADDED, true), true);
+ ui.signalRepositoryOperationComplete(
+ new RepositoryEvent(repoLocation, IRepository.TYPE_ARTIFACT, RepositoryEvent.ADDED, true), true);
}
}
@@ -63,10 +64,6 @@ public class ArtifactRepositoryTracker extends RepositoryTracker {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#refreshRepositories(java.net.URI[], org.eclipse.equinox.p2.operations.ProvisioningSession, org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
ui.signalRepositoryOperationStart();
@@ -75,11 +72,12 @@ public class ArtifactRepositoryTracker extends RepositoryTracker {
try {
getArtifactRepositoryManager().refreshRepository(locations[i], mon.newChild(100));
} catch (ProvisionException e) {
- //ignore problematic repositories when refreshing
+ // ignore problematic repositories when refreshing
}
}
- // We have no idea how many repos may have been added/removed as a result of
- // refreshing these, this one, so we do not use a specific repository event to represent it.
+ // We have no idea how many repos may have been added/removed as a result of
+ // refreshing these, this one, so we do not use a specific repository event to
+ // represent it.
ui.signalRepositoryOperationComplete(null, true);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java
index 121d985e5..0ff29eeb5 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/PatternFilter.java
@@ -20,9 +20,11 @@ import org.eclipse.jface.viewers.*;
import org.eclipse.ui.internal.misc.StringMatcher;
/**
- * A filter used in conjunction with <code>FilteredTree</code>. In order to determine if a node should be filtered it
- * uses the content and label provider of the tree to do pattern matching on its children. This causes the entire tree
- * structure to be realized. Note that the label provider must implement ILabelProvider.
+ * A filter used in conjunction with <code>FilteredTree</code>. In order to
+ * determine if a node should be filtered it uses the content and label provider
+ * of the tree to do pattern matching on its children. This causes the entire
+ * tree structure to be realized. Note that the label provider must implement
+ * ILabelProvider.
*
* @see org.eclipse.ui.dialogs.FilteredTree
* @since 3.2
@@ -42,7 +44,8 @@ public class PatternFilter extends ViewerFilter {
private boolean useCache = false;
/**
- * Whether to include a leading wildcard for all provided patterns. A trailing wildcard is always included.
+ * Whether to include a leading wildcard for all provided patterns. A trailing
+ * wildcard is always included.
*/
private boolean includeLeadingWildcard = false;
@@ -55,9 +58,6 @@ public class PatternFilter extends ViewerFilter {
private static Object[] EMPTY = new Object[0];
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#filter(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object[])
- */
@Override
public final Object[] filter(Viewer viewer, Object parent, Object[] elements) {
// we don't want to optimize if we've extended the filter ... this
@@ -85,13 +85,12 @@ public class PatternFilter extends ViewerFilter {
}
/**
- * Returns true if any of the elements makes it through the filter. This method uses caching if enabled; the
- * computation is done in computeAnyVisible.
+ * Returns true if any of the elements makes it through the filter. This method
+ * uses caching if enabled; the computation is done in computeAnyVisible.
*
* @param viewer
* @param parent
- * @param elements
- * the elements (must not be an empty array)
+ * @param elements the elements (must not be an empty array)
* @return true if any of the elements makes it through the filter.
*/
private boolean isAnyVisible(Viewer viewer, Object parent, Object[] elements) {
@@ -118,10 +117,8 @@ public class PatternFilter extends ViewerFilter {
/**
* Returns true if any of the elements makes it through the filter.
*
- * @param viewer
- * the viewer
- * @param elements
- * the elements to test
+ * @param viewer the viewer
+ * @param elements the elements to test
* @return <code>true</code> if any of the elements makes it through the filter
*/
private boolean computeAnyVisible(Viewer viewer, Object[] elements) {
@@ -133,9 +130,6 @@ public class PatternFilter extends ViewerFilter {
return elementFound;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public final boolean select(Viewer viewer, Object parentElement, Object element) {
return isElementVisible(viewer, element);
@@ -144,15 +138,15 @@ public class PatternFilter extends ViewerFilter {
/**
* Sets whether a leading wildcard should be attached to each pattern string.
*
- * @param includeLeadingWildcard
- * Whether a leading wildcard should be added.
+ * @param includeLeadingWildcard Whether a leading wildcard should be added.
*/
public final void setIncludeLeadingWildcard(final boolean includeLeadingWildcard) {
this.includeLeadingWildcard = includeLeadingWildcard;
}
/**
- * The pattern string for which this filter should select elements in the viewer.
+ * The pattern string for which this filter should select elements in the
+ * viewer.
*
* @param patternString
*/
@@ -179,7 +173,8 @@ public class PatternFilter extends ViewerFilter {
}
/**
- * Clears the caches used for optimizing this filter. Needs to be called whenever the tree content changes.
+ * Clears the caches used for optimizing this filter. Needs to be called
+ * whenever the tree content changes.
*/
/* package */void clearCaches() {
cache.clear();
@@ -189,8 +184,7 @@ public class PatternFilter extends ViewerFilter {
/**
* Answers whether the given String matches the pattern.
*
- * @param string
- * the String to test
+ * @param string the String to test
* @return whether the string matches the pattern
*/
private boolean match(String string) {
@@ -201,8 +195,9 @@ public class PatternFilter extends ViewerFilter {
}
/**
- * Answers whether the given element is a valid selection in the filtered tree. For example, if a tree has items
- * that are categorized, the category itself may not be a valid selection since it is used merely to organize the
+ * Answers whether the given element is a valid selection in the filtered tree.
+ * For example, if a tree has items that are categorized, the category itself
+ * may not be a valid selection since it is used merely to organize the
* elements.
*
* @param element
@@ -213,15 +208,14 @@ public class PatternFilter extends ViewerFilter {
}
/**
- * Answers whether the given element in the given viewer matches the filter pattern. This is a default
- * implementation that will show a leaf element in the tree based on whether the provided filter text matches the
- * text of the given element's text, or that of it's children (if the element has any). Subclasses may override this
- * method.
+ * Answers whether the given element in the given viewer matches the filter
+ * pattern. This is a default implementation that will show a leaf element in
+ * the tree based on whether the provided filter text matches the text of the
+ * given element's text, or that of it's children (if the element has any).
+ * Subclasses may override this method.
*
- * @param viewer
- * the tree viewer in which the element resides
- * @param element
- * the element in the tree to check for a match
+ * @param viewer the tree viewer in which the element resides
+ * @param element the element in the tree to check for a match
* @return true if the element matches the filter pattern
*/
public boolean isElementVisible(Viewer viewer, Object element) {
@@ -229,13 +223,12 @@ public class PatternFilter extends ViewerFilter {
}
/**
- * Check if the parent (category) is a match to the filter text. The default behavior returns true if the element
- * has at least one child element that is a match with the filter text. Subclasses may override this method.
+ * Check if the parent (category) is a match to the filter text. The default
+ * behavior returns true if the element has at least one child element that is a
+ * match with the filter text. Subclasses may override this method.
*
- * @param viewer
- * the viewer that contains the element
- * @param element
- * the tree element to check
+ * @param viewer the viewer that contains the element
+ * @param element the tree element to check
* @return true if the given element has children that matches the filter text
*/
protected boolean isParentMatch(Viewer viewer, Object element) {
@@ -252,13 +245,12 @@ public class PatternFilter extends ViewerFilter {
}
/**
- * Check if the current (leaf) element is a match with the filter text. The default behavior checks that the label
- * of the element is a match. Subclasses should override this method.
+ * Check if the current (leaf) element is a match with the filter text. The
+ * default behavior checks that the label of the element is a match. Subclasses
+ * should override this method.
*
- * @param viewer
- * the viewer that contains the element
- * @param element
- * the tree element to check
+ * @param viewer the viewer that contains the element
+ * @param element the tree element to check
* @return true if the given element's label matches the filter text
*/
protected boolean isLeafMatch(Viewer viewer, Object element) {
@@ -271,7 +263,8 @@ public class PatternFilter extends ViewerFilter {
}
/**
- * Take the given filter text and break it down into words using a BreakIterator.
+ * Take the given filter text and break it down into words using a
+ * BreakIterator.
*
* @param text
* @return an array of words
@@ -307,16 +300,16 @@ public class PatternFilter extends ViewerFilter {
/**
* Return whether or not if any of the words in text satisfy the match critera.
*
- * @param text
- * the text to match
- * @return boolean <code>true</code> if one of the words in text satisifes the match criteria.
+ * @param text the text to match
+ * @return boolean <code>true</code> if one of the words in text satisifes the
+ * match criteria.
*/
protected boolean wordMatches(String text) {
if (text == null) {
return false;
}
- //If the whole text matches we are all set
+ // If the whole text matches we are all set
if (match(text)) {
return true;
}
@@ -335,8 +328,7 @@ public class PatternFilter extends ViewerFilter {
/**
* Can be called by the filtered tree to turn on caching.
*
- * @param useCache
- * The useCache to set.
+ * @param useCache The useCache to set.
*/
void setUseCache(boolean useCache) {
this.useCache = useCache;
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
index ccaf7553a..084a346ff 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
@@ -149,9 +149,7 @@ public class ImportPage extends AbstractImportPage implements ISelectableIUsPage
/*
* Overridden to remember the pattern string for an optimization in
- * isParentMatch (non-Javadoc)
- *
- * @see org.eclipse.ui.dialogs.PatternFilter#setPattern(java.lang.String)
+ * isParentMatch
*/
@Override
public void setPattern(String patternString) {
@@ -161,11 +159,6 @@ public class ImportPage extends AbstractImportPage implements ISelectableIUsPage
/*
* Overridden to avoid getting children unless there is actually a filter.
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.dialogs.PatternFilter#isParentMatch(org.eclipse.jface.viewers.
- * Viewer, java.lang.Object)
*/
@Override
protected boolean isParentMatch(Viewer viewer1, Object element) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
index cf56d0366..c2609fda3 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/AutomaticUpdatesPopup.java
@@ -36,14 +36,18 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.progress.WorkbenchJob;
/**
- * AutomaticUpdatesPopup is an async popup dialog for notifying
- * the user of updates.
+ * AutomaticUpdatesPopup is an async popup dialog for notifying the user of
+ * updates.
*
* @since 3.4
*/
public class AutomaticUpdatesPopup extends PopupDialog {
- public static final String[] ELAPSED_VALUES = {PreferenceConstants.PREF_REMIND_30Minutes, PreferenceConstants.PREF_REMIND_60Minutes, PreferenceConstants.PREF_REMIND_240Minutes};
- public static final String[] ELAPSED_LOCALIZED_STRINGS = {AutomaticUpdateMessages.AutomaticUpdateScheduler_30Minutes, AutomaticUpdateMessages.AutomaticUpdateScheduler_60Minutes, AutomaticUpdateMessages.AutomaticUpdateScheduler_240Minutes};
+ public static final String[] ELAPSED_VALUES = { PreferenceConstants.PREF_REMIND_30Minutes,
+ PreferenceConstants.PREF_REMIND_60Minutes, PreferenceConstants.PREF_REMIND_240Minutes };
+ public static final String[] ELAPSED_LOCALIZED_STRINGS = {
+ AutomaticUpdateMessages.AutomaticUpdateScheduler_30Minutes,
+ AutomaticUpdateMessages.AutomaticUpdateScheduler_60Minutes,
+ AutomaticUpdateMessages.AutomaticUpdateScheduler_240Minutes };
private static final long MINUTE = 60 * 1000L;
private static final String PREFS_HREF = "PREFS"; //$NON-NLS-1$
private static final String DIALOG_SETTINGS_SECTION = "AutomaticUpdatesPopup"; //$NON-NLS-1$
@@ -59,11 +63,13 @@ public class AutomaticUpdatesPopup extends PopupDialog {
MouseListener clickListener;
public AutomaticUpdatesPopup(Shell parentShell, boolean alreadyDownloaded, IPreferenceStore prefs) {
- super(parentShell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE | SWT.MODELESS, false, true, true, false, false, AutomaticUpdateMessages.AutomaticUpdatesPopup_UpdatesAvailableTitle, null);
+ super(parentShell, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE | SWT.MODELESS, false, true, true, false, false,
+ AutomaticUpdateMessages.AutomaticUpdatesPopup_UpdatesAvailableTitle, null);
downloaded = alreadyDownloaded;
this.prefs = prefs;
remindDelay = computeRemindDelay();
- clickListener = MouseListener.mouseDownAdapter(e -> AutomaticUpdatePlugin.getDefault().getAutomaticUpdater().launchUpdate());
+ clickListener = MouseListener
+ .mouseDownAdapter(e -> AutomaticUpdatePlugin.getDefault().getAutomaticUpdater().launchUpdate());
}
@Override
@@ -94,7 +100,8 @@ public class AutomaticUpdatesPopup extends PopupDialog {
remindLink = new Link(parent, SWT.MULTI | SWT.WRAP | SWT.RIGHT);
updateRemindText();
remindLink.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> {
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), PreferenceConstants.PREF_PAGE_AUTO_UPDATES, null, null);
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(),
+ PreferenceConstants.PREF_PAGE_AUTO_UPDATES, null, null);
dialog.open();
}));
@@ -103,7 +110,8 @@ public class AutomaticUpdatesPopup extends PopupDialog {
private void updateRemindText() {
if (prefs.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE))
- remindLink.setText(NLS.bind(AutomaticUpdateMessages.AutomaticUpdatesPopup_RemindAndPrefLink, new String[] {getElapsedTimeString(prefs.getString(PreferenceConstants.PREF_REMIND_ELAPSED)), PREFS_HREF}));
+ remindLink.setText(NLS.bind(AutomaticUpdateMessages.AutomaticUpdatesPopup_RemindAndPrefLink, new String[] {
+ getElapsedTimeString(prefs.getString(PreferenceConstants.PREF_REMIND_ELAPSED)), PREFS_HREF }));
else
remindLink.setText(AutomaticUpdateMessages.AutomaticUpdatesPopup_PrefLinkOnly);
remindLink.getParent().layout(true);
@@ -166,8 +174,8 @@ public class AutomaticUpdatesPopup extends PopupDialog {
}
/*
- * Computes the number of milliseconds for the delay
- * in reminding the user of updates
+ * Computes the number of milliseconds for the delay in reminding the user of
+ * updates
*/
long computeRemindDelay() {
if (prefs.getBoolean(PreferenceConstants.PREF_REMIND_SCHEDULE)) {
@@ -175,15 +183,15 @@ public class AutomaticUpdatesPopup extends PopupDialog {
for (int d = 0; d < ELAPSED_VALUES.length; d++)
if (ELAPSED_VALUES[d].equals(elapsed))
switch (d) {
- case 0 :
- // 30 minutes
- return 30 * MINUTE;
- case 1 :
- // 60 minutes
- return 60 * MINUTE;
- case 2 :
- // 240 minutes
- return 240 * MINUTE;
+ case 0:
+ // 30 minutes
+ return 30 * MINUTE;
+ case 1:
+ // 60 minutes
+ return 60 * MINUTE;
+ case 2:
+ // 240 minutes
+ return 240 * MINUTE;
}
}
return -1L;
@@ -217,7 +225,8 @@ public class AutomaticUpdatesPopup extends PopupDialog {
}
// We have to take parent location into account because SWT considers all
// shell locations to be in display coordinates, even if the shell is parented.
- return new Point(parentSize.x - initialSize.x + parentLocation.x - POPUP_OFFSET, parentSize.y - initialSize.y + parentLocation.y - POPUP_OFFSET);
+ return new Point(parentSize.x - initialSize.x + parentLocation.x - POPUP_OFFSET,
+ parentSize.y - initialSize.y + parentLocation.y - POPUP_OFFSET);
}
void handlePreferenceChange(PropertyChangeEvent event) {
@@ -247,8 +256,8 @@ public class AutomaticUpdatesPopup extends PopupDialog {
}
/*
- * Overridden so that clicking in the title menu area closes the dialog.
- * Also creates a close box menu in the title area.
+ * Overridden so that clicking in the title menu area closes the dialog. Also
+ * creates a close box menu in the title area.
*/
@Override
protected Control createTitleMenuArea(Composite parent) {
@@ -259,8 +268,10 @@ public class AutomaticUpdatesPopup extends PopupDialog {
ToolItem closeButton = new ToolItem(toolBar, SWT.PUSH, 0);
GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
- closeButton.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE)));
- closeButton.setHotImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE_HOT)));
+ closeButton.setImage(
+ AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE)));
+ closeButton.setHotImage(
+ AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE_HOT)));
closeButton.addSelectionListener(SelectionListener.widgetSelectedAdapter(e -> close()));
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=177183
toolBar.addMouseListener(MouseListener.mouseDownAdapter(e -> close()));
@@ -268,10 +279,7 @@ public class AutomaticUpdatesPopup extends PopupDialog {
}
/*
- * Overridden to adjust the span of the title label.
- * Reachy, reachy....
- * (non-Javadoc)
- * @see org.eclipse.jface.dialogs.PopupDialog#createTitleControl(org.eclipse.swt.widgets.Composite)
+ * Overridden to adjust the span of the title label. Reachy, reachy....
*/
@Override
protected Control createTitleControl(Composite parent) {
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
index 9e9a8c1c7..5ed23ab84 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ColocatedRepositoryTracker.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -36,9 +36,9 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.statushandlers.StatusManager;
/**
- * Provides a repository tracker that interprets URLs as colocated
- * artifact and metadata repositories.
- *
+ * Provides a repository tracker that interprets URLs as colocated artifact and
+ * metadata repositories.
+ *
* @since 2.0
*/
@@ -65,8 +65,10 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
try {
getMetadataRepositoryManager().addRepository(repoLocation);
getArtifactRepositoryManager().addRepository(repoLocation);
- getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_SYSTEM, Boolean.FALSE.toString());
- getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_SYSTEM, Boolean.FALSE.toString());
+ getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_SYSTEM,
+ Boolean.FALSE.toString());
+ getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_SYSTEM,
+ Boolean.FALSE.toString());
if (nickname != null) {
getMetadataRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
getArtifactRepositoryManager().setRepositoryProperty(repoLocation, IRepository.PROP_NICKNAME, nickname);
@@ -74,7 +76,8 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
}
} finally {
// We know that the UI only responds to metadata repo events so we cheat...
- ui.signalRepositoryOperationComplete(new RepositoryEvent(repoLocation, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true), true);
+ ui.signalRepositoryOperationComplete(
+ new RepositoryEvent(repoLocation, IRepository.TYPE_METADATA, RepositoryEvent.ADDED, true), true);
}
}
@@ -82,9 +85,9 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
public void removeRepositories(URI[] repoLocations, ProvisioningSession session) {
ui.signalRepositoryOperationStart();
try {
- for (int i = 0; i < repoLocations.length; i++) {
- getMetadataRepositoryManager().removeRepository(repoLocations[i]);
- getArtifactRepositoryManager().removeRepository(repoLocations[i]);
+ for (URI repoLocation : repoLocations) {
+ getMetadataRepositoryManager().removeRepository(repoLocation);
+ getArtifactRepositoryManager().removeRepository(repoLocation);
}
} finally {
ui.signalRepositoryOperationComplete(null, true);
@@ -95,23 +98,25 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
public void refreshRepositories(URI[] locations, ProvisioningSession session, IProgressMonitor monitor) {
ui.signalRepositoryOperationStart();
SubMonitor mon = SubMonitor.convert(monitor, locations.length * 100);
- for (int i = 0; i < locations.length; i++) {
+ for (URI location : locations) {
try {
- getArtifactRepositoryManager().refreshRepository(locations[i], mon.newChild(50));
- getMetadataRepositoryManager().refreshRepository(locations[i], mon.newChild(50));
+ getArtifactRepositoryManager().refreshRepository(location, mon.newChild(50));
+ getMetadataRepositoryManager().refreshRepository(location, mon.newChild(50));
} catch (ProvisionException e) {
- //ignore problematic repositories when refreshing
+ // ignore problematic repositories when refreshing
}
}
- // We have no idea how many repos may have been added/removed as a result of
- // refreshing these, this one, so we do not use a specific repository event to represent it.
+ // We have no idea how many repos may have been added/removed as a result of
+ // refreshing these, this one, so we do not use a specific repository event to
+ // represent it.
ui.signalRepositoryOperationComplete(null, true);
}
@Override
public void reportLoadFailure(final URI location, ProvisionException e) {
int code = e.getStatus().getCode();
- // If the user doesn't have a way to manage repositories, then don't report failures.
+ // If the user doesn't have a way to manage repositories, then don't report
+ // failures.
if (!ui.getPolicy().getRepositoriesVisible()) {
super.reportLoadFailure(location, e);
return;
@@ -127,7 +132,12 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
if (workbench.isClosing())
return;
Shell shell = ProvUI.getDefaultParentShell();
- int result = MessageDialog.open(MessageDialog.QUESTION, shell, ProvUIMessages.ColocatedRepositoryTracker_SiteNotFoundTitle, NLS.bind(ProvUIMessages.ColocatedRepositoryTracker_PromptForSiteLocationEdit, URIUtil.toUnencodedString(location)), SWT.NONE, ProvUIMessages.ColocatedRepositoryTracker_SiteNotFound_EditButtonLabel, IDialogConstants.NO_LABEL);
+ int result = MessageDialog.open(MessageDialog.QUESTION, shell,
+ ProvUIMessages.ColocatedRepositoryTracker_SiteNotFoundTitle,
+ NLS.bind(ProvUIMessages.ColocatedRepositoryTracker_PromptForSiteLocationEdit,
+ URIUtil.toUnencodedString(location)),
+ SWT.NONE, ProvUIMessages.ColocatedRepositoryTracker_SiteNotFound_EditButtonLabel,
+ IDialogConstants.NO_LABEL);
if (result == 0) {
RepositoryNameAndLocationDialog dialog = new RepositoryNameAndLocationDialog(shell, ui) {
@Override
@@ -137,7 +147,8 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
@Override
protected String getInitialNameText() {
- String nickname = getMetadataRepositoryManager().getRepositoryProperty(location, IRepository.PROP_NICKNAME);
+ String nickname = getMetadataRepositoryManager().getRepositoryProperty(location,
+ IRepository.PROP_NICKNAME);
return nickname == null ? "" : nickname; //$NON-NLS-1$
}
};
@@ -147,7 +158,7 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
if (correctedLocation != null) {
ui.signalRepositoryOperationStart();
try {
- removeRepositories(new URI[] {location}, ui.getSession());
+ removeRepositories(new URI[] { location }, ui.getSession());
addRepository(correctedLocation, dialog.getName(), ui.getSession());
} finally {
ui.signalRepositoryOperationComplete(null, true);
@@ -172,8 +183,6 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
/*
* Overridden to support "Name - Location" parsing
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.RepositoryTracker#locationFromString(java.lang.String)
*/
@Override
public URI locationFromString(String locationString) {
@@ -181,7 +190,8 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
if (uri != null)
return uri;
// Look for the "Name - Location" pattern
- // There could be a hyphen in the name or URI, so we have to visit all combinations
+ // There could be a hyphen in the name or URI, so we have to visit all
+ // combinations
int start = 0;
int index = 0;
String locationSubset;
@@ -203,9 +213,9 @@ public class ColocatedRepositoryTracker extends RepositoryTracker {
}
/*
- * Used by the UI to get a name that might have been supplied when the
- * location was originally parsed.
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
+ * Used by the UI to get a name that might have been supplied when the location
+ * was originally parsed. see
+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=293068
*/
public String getParsedNickname(URI location) {
if (parsedNickname == null || parsedLocation == null)
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
index 52c167d9e..512bbb7af 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableArtifactRepositoryManager.java
@@ -40,13 +40,11 @@ public class QueryableArtifactRepositoryManager extends QueryableRepositoryManag
}
@Override
- protected IArtifactRepository doLoadRepository(IRepositoryManager<IArtifactKey> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
+ protected IArtifactRepository doLoadRepository(IRepositoryManager<IArtifactKey> manager, URI location,
+ IProgressMonitor monitor) throws ProvisionException {
return ui.loadArtifactRepository(location, false, monitor);
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
- */
@Override
protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
return repositoryManipulator.getArtifactRepositoryFlags();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
index 468e9d29c..c912f7c62 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryableMetadataRepositoryManager.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
@@ -48,13 +48,11 @@ public class QueryableMetadataRepositoryManager extends QueryableRepositoryManag
}
@Override
- protected IMetadataRepository doLoadRepository(IRepositoryManager<IInstallableUnit> manager, URI location, IProgressMonitor monitor) throws ProvisionException {
+ protected IMetadataRepository doLoadRepository(IRepositoryManager<IInstallableUnit> manager, URI location,
+ IProgressMonitor monitor) throws ProvisionException {
return ui.loadMetadataRepository(location, false, monitor);
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.p2.ui.QueryableRepositoryManager#getRepositoryFlags(org.eclipse.equinox.p2.ui.RepositoryManipulator)
- */
@Override
protected int getRepositoryFlags(RepositoryTracker repositoryManipulator) {
return repositoryManipulator.getMetadataRepositoryFlags();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java
index 45bf2df96..5f68b1555 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/IUViewQueryContext.java
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* IBM Corporation - initial API and implementation
* Ericsson AB (Hamdan Msheik) - Bug 396420 - Control Install dialog through preference customization
@@ -18,10 +18,10 @@ import org.eclipse.equinox.internal.p2.ui.ProvUIMessages;
import org.eclipse.equinox.internal.p2.ui.QueryProvider;
/**
- * IUViewQueryContext defines the different ways
- * IUs can be viewed. Clients can use this context to
- * control how the various IU views are represented and traversed.
- *
+ * IUViewQueryContext defines the different ways IUs can be viewed. Clients can
+ * use this context to control how the various IU views are represented and
+ * traversed.
+ *
* @since 2.0
*/
public class IUViewQueryContext {
@@ -33,13 +33,14 @@ public class IUViewQueryContext {
// Default available view to repo as this provides the fastest information
private int view = AVAILABLE_VIEW_BY_REPO;
// Whether to show latest versions only, defaults to
- // true. Clients typically use a pref setting or dialog
+ // true. Clients typically use a pref setting or dialog
// setting to initialize
private boolean showLatestVersionsOnly = true;
// Whether to hide things that are already installed
// Defaults to false since we wouldn't know what profile to use
private boolean hideAlreadyInstalled = false;
- // Whether to group items in repos by category. Note this only makes sense when the
+ // Whether to group items in repos by category. Note this only makes sense when
+ // the
// view type is AVAILABLE_VIEW_BY_REPO
private boolean useCategories = true;
// Whether to drill down into installed items
@@ -48,7 +49,8 @@ public class IUViewQueryContext {
private boolean showAvailableChildren = false;
// Whether to drill down into items in a provisioning plan
private boolean showProvisioningPlanChildren = true;
- // Whether to filter out IUs based on the environment settings of the target profile
+ // Whether to filter out IUs based on the environment settings of the target
+ // profile
private boolean filterOnEnv = false;
private String profileId = null;
@@ -60,8 +62,9 @@ public class IUViewQueryContext {
this.view = viewType;
}
- /* (non-Javadoc)
- * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueryContext#getQueryType()
+ /*
+ * @see org.eclipse.equinox.internal.provisional.p2.ui.query.QueryContext#
+ * getQueryType()
*/
public int getQueryType() {
if (view == AVAILABLE_VIEW_BY_REPO)
@@ -110,11 +113,11 @@ public class IUViewQueryContext {
}
/**
- * Set a boolean that indicates whether categories should be used when
- * viewing by repository.
- *
- * useCategories <code>true</code> if a site in a sites view should expand into categories,
- * <code>false</code> if it should expand into IU's.
+ * Set a boolean that indicates whether categories should be used when viewing
+ * by repository.
+ *
+ * useCategories <code>true</code> if a site in a sites view should expand into
+ * categories, <code>false</code> if it should expand into IU's.
*/
public void setUseCategories(boolean useCategories) {
@@ -124,9 +127,9 @@ public class IUViewQueryContext {
/**
* Return a boolean that indicates whether categories should be used when
* viewing by repository.
- *
- * @return <code>true</code> if a site in a sites view should expand into categories,
- * <code>false</code> if it should expand into IU's.
+ *
+ * @return <code>true</code> if a site in a sites view should expand into
+ * categories, <code>false</code> if it should expand into IU's.
*/
public boolean getUseCategories() {
return useCategories;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
index 7f1da20e2..0b79973dd 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/viewers/DeferredQueryTreeContentManager.java
@@ -22,9 +22,9 @@ import org.eclipse.ui.progress.*;
/**
* DeferredQueryTreeContentManager is an extension of DeferredTreeContentManager
* that associates pending placeholders with their parent elements, so that
- * clients know when a particular parent element is finished fetching
- * its contents.
- *
+ * clients know when a particular parent element is finished fetching its
+ * contents.
+ *
* @since 3.4
*
*/
@@ -53,10 +53,8 @@ public class DeferredQueryTreeContentManager extends DeferredTreeContentManager
}
/*
- * Overridden to keep track of the current request long enough
- * to put it in the pending update adapter.
- * (non-Javadoc)
- * @see org.eclipse.ui.progress.DeferredTreeContentManager#getChildren(java.lang.Object)
+ * Overridden to keep track of the current request long enough to put it in the
+ * pending update adapter.
*/
@Override
public Object[] getChildren(final Object parent) {
@@ -66,11 +64,10 @@ public class DeferredQueryTreeContentManager extends DeferredTreeContentManager
/*
* Overridden to signal the start of a fetch
- * (non-Javadoc)
- * @see org.eclipse.ui.progress.DeferredTreeContentManager#startFetchingDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IDeferredWorkbenchAdapter, org.eclipse.ui.progress.PendingUpdateAdapter)
*/
@Override
- protected void startFetchingDeferredChildren(final Object parent, final IDeferredWorkbenchAdapter adapter, final PendingUpdateAdapter placeholder) {
+ protected void startFetchingDeferredChildren(final Object parent, final IDeferredWorkbenchAdapter adapter,
+ final PendingUpdateAdapter placeholder) {
if (placeholder instanceof ElementPendingUpdateAdapter)
notifyListener(true, (ElementPendingUpdateAdapter) placeholder);
super.startFetchingDeferredChildren(parent, adapter, placeholder);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
index cdfb6f8b1..d141a7f9d 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/p2/ui/LoadMetadataRepositoryJob.java
@@ -27,12 +27,13 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
import org.eclipse.ui.statushandlers.StatusManager;
/**
- * A job that loads a set of metadata repositories and caches the loaded repositories.
- * This job can be used when repositories are loaded by a client who wishes to
- * maintain (and pass along) the in-memory references to the repositories. For example,
- * repositories can be loaded in the background and then passed to another
- * component, thus ensuring that the repositories remain loaded in memory.
- *
+ * A job that loads a set of metadata repositories and caches the loaded
+ * repositories. This job can be used when repositories are loaded by a client
+ * who wishes to maintain (and pass along) the in-memory references to the
+ * repositories. For example, repositories can be loaded in the background and
+ * then passed to another component, thus ensuring that the repositories remain
+ * loaded in memory.
+ *
* @since 2.0
* @noextend This class is not intended to be subclassed by clients.
*/
@@ -44,32 +45,37 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
public static final Object LOAD_FAMILY = new Object();
/**
- * The key that should be used to set a property on a repository load job to indicate
- * that authentication should be suppressed when loading the repositories.
+ * The key that should be used to set a property on a repository load job to
+ * indicate that authentication should be suppressed when loading the
+ * repositories.
*/
- public static final QualifiedName SUPPRESS_AUTHENTICATION_JOB_MARKER = new QualifiedName(ProvUIActivator.PLUGIN_ID, "SUPPRESS_AUTHENTICATION_REQUESTS"); //$NON-NLS-1$
+ public static final QualifiedName SUPPRESS_AUTHENTICATION_JOB_MARKER = new QualifiedName(ProvUIActivator.PLUGIN_ID,
+ "SUPPRESS_AUTHENTICATION_REQUESTS"); //$NON-NLS-1$
/**
- * The key that should be used to set a property on a repository load job to indicate
- * that repository events triggered by this job should be suppressed so that clients
- * will ignore all events related to the load.
+ * The key that should be used to set a property on a repository load job to
+ * indicate that repository events triggered by this job should be suppressed so
+ * that clients will ignore all events related to the load.
*/
- public static final QualifiedName SUPPRESS_REPOSITORY_EVENTS = new QualifiedName(ProvUIActivator.PLUGIN_ID, "SUPRESS_REPOSITORY_EVENTS"); //$NON-NLS-1$
+ public static final QualifiedName SUPPRESS_REPOSITORY_EVENTS = new QualifiedName(ProvUIActivator.PLUGIN_ID,
+ "SUPRESS_REPOSITORY_EVENTS"); //$NON-NLS-1$
/**
- * The key that should be used to set a property on a repository load job to indicate
- * that a wizard receiving this job needs to schedule it. In some cases, a load job
- * is finished before invoking a wizard. In other cases, the job has not yet been
- * scheduled so that listeners can be set up first.
+ * The key that should be used to set a property on a repository load job to
+ * indicate that a wizard receiving this job needs to schedule it. In some
+ * cases, a load job is finished before invoking a wizard. In other cases, the
+ * job has not yet been scheduled so that listeners can be set up first.
*/
- public static final QualifiedName WIZARD_CLIENT_SHOULD_SCHEDULE = new QualifiedName(ProvUIActivator.PLUGIN_ID, "WIZARD_CLIENT_SHOULD_SCHEDULE"); //$NON-NLS-1$
+ public static final QualifiedName WIZARD_CLIENT_SHOULD_SCHEDULE = new QualifiedName(ProvUIActivator.PLUGIN_ID,
+ "WIZARD_CLIENT_SHOULD_SCHEDULE"); //$NON-NLS-1$
/**
- * The key that should be used to set a property on a repository load job to indicate
- * that load errors should be accumulated into a single status rather than reported
- * as they occur.
+ * The key that should be used to set a property on a repository load job to
+ * indicate that load errors should be accumulated into a single status rather
+ * than reported as they occur.
*/
- public static final QualifiedName ACCUMULATE_LOAD_ERRORS = new QualifiedName(ProvUIActivator.PLUGIN_ID, "ACCUMULATE_LOAD_ERRORS"); //$NON-NLS-1$
+ public static final QualifiedName ACCUMULATE_LOAD_ERRORS = new QualifiedName(ProvUIActivator.PLUGIN_ID,
+ "ACCUMULATE_LOAD_ERRORS"); //$NON-NLS-1$
private List<IMetadataRepository> repoCache = new ArrayList<>();
private RepositoryTracker tracker;
@@ -78,7 +84,9 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
private ProvisioningUI ui;
/**
- * Create a job that loads the metadata repositories known by the specified RepositoryTracker.
+ * Create a job that loads the metadata repositories known by the specified
+ * RepositoryTracker.
+ *
* @param ui the ProvisioningUI providing the necessary services
*/
public LoadMetadataRepositoryJob(ProvisioningUI ui) {
@@ -88,10 +96,6 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
this.locations = tracker.getKnownRepositories(ui.getSession());
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.equinox.p2.operations.ProvisioningJob#runModal(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public IStatus runModal(IProgressMonitor monitor) {
if (locations == null || locations.length == 0)
@@ -99,7 +103,7 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
IStatus status;
- // We batch all the time as a way of distinguishing client-initiated repository
+ // We batch all the time as a way of distinguishing client-initiated repository
// jobs from low level repository manipulation.
ui.signalRepositoryOperationStart();
try {
@@ -111,16 +115,18 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
}
private IStatus doLoad(IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.LoadMetadataRepositoryJob_ContactSitesProgress, locations.length * 100);
+ SubMonitor sub = SubMonitor.convert(monitor, ProvUIMessages.LoadMetadataRepositoryJob_ContactSitesProgress,
+ locations.length * 100);
if (sub.isCanceled())
return Status.CANCEL_STATUS;
- for (int i = 0; i < locations.length; i++) {
+ for (URI location : locations) {
if (sub.isCanceled())
return Status.CANCEL_STATUS;
try {
- repoCache.add(ProvUI.getMetadataRepositoryManager(ui.getSession()).loadRepository(locations[i], sub.newChild(100)));
+ repoCache.add(ProvUI.getMetadataRepositoryManager(ui.getSession()).loadRepository(location,
+ sub.newChild(100)));
} catch (ProvisionException e) {
- handleLoadFailure(e, locations[i]);
+ handleLoadFailure(e, location);
} catch (OperationCanceledException e) {
return Status.CANCEL_STATUS;
}
@@ -130,20 +136,23 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
private void handleLoadFailure(ProvisionException e, URI location) {
if (shouldAccumulateFailures()) {
- // Some ProvisionExceptions include an empty multi status with a message.
- // Since empty multi statuses have a severity OK, The platform status handler doesn't handle
- // this well. We correct this by recreating a status with error severity
+ // Some ProvisionExceptions include an empty multi status with a message.
+ // Since empty multi statuses have a severity OK, The platform status handler
+ // doesn't handle
+ // this well. We correct this by recreating a status with error severity
// so that the platform status handler does the right thing.
IStatus status = e.getStatus();
if (status instanceof MultiStatus && ((MultiStatus) status).getChildren().length == 0)
- status = new Status(IStatus.ERROR, status.getPlugin(), status.getCode(), status.getMessage(), status.getException());
+ status = new Status(IStatus.ERROR, status.getPlugin(), status.getCode(), status.getMessage(),
+ status.getException());
if (accumulatedStatus == null) {
- accumulatedStatus = new MultiStatus(ProvUIActivator.PLUGIN_ID, ProvisionException.REPOSITORY_NOT_FOUND, new IStatus[] {status}, ProvUIMessages.LoadMetadataRepositoryJob_SitesMissingError, null);
+ accumulatedStatus = new MultiStatus(ProvUIActivator.PLUGIN_ID, ProvisionException.REPOSITORY_NOT_FOUND,
+ new IStatus[] { status }, ProvUIMessages.LoadMetadataRepositoryJob_SitesMissingError, null);
} else {
accumulatedStatus.add(status);
}
ui.getRepositoryTracker().addNotFound(location);
- // Always log the complete exception so the detailed stack trace is in the log.
+ // Always log the complete exception so the detailed stack trace is in the log.
LogHelper.log(e);
} else {
tracker.reportLoadFailure(location, e);
@@ -155,9 +164,9 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
}
/**
- * Report the accumulated status for repository load failures. If there has been
+ * Report the accumulated status for repository load failures. If there has been
* no status accumulated, or if the job has been cancelled, do not report
- * anything. Detailed errors have already been logged.
+ * anything. Detailed errors have already been logged.
*/
public void reportAccumulatedStatus() {
IStatus status = getCurrentStatus();
@@ -168,13 +177,15 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
if (!ui.getPolicy().getRepositoriesVisible())
return;
StatusManager.getManager().handle(status, StatusManager.SHOW);
- // Reset the accumulated status so that next time we only report the newly not found repos.
+ // Reset the accumulated status so that next time we only report the newly not
+ // found repos.
accumulatedStatus = null;
}
private IStatus getCurrentStatus() {
if (accumulatedStatus != null) {
- // If there is only missing repo to report, use the specific message rather than the generic.
+ // If there is only missing repo to report, use the specific message rather than
+ // the generic.
if (accumulatedStatus.getChildren().length == 1)
return accumulatedStatus.getChildren()[0];
return accumulatedStatus;
@@ -182,10 +193,6 @@ public class LoadMetadataRepositoryJob extends ProvisioningJob {
return Status.OK_STATUS;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
- */
@Override
public boolean belongsTo(Object family) {
return family == LOAD_FAMILY;
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java
index c28eaa122..944754e37 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteBundle.java
@@ -58,14 +58,15 @@ public class SiteBundle {
File file2 = new File(url2.getFile());
return file1.equals(file2);
}
- // URL1 xor URL2 is a file, return false. (They either both need to be files, or neither)
+ // URL1 xor URL2 is a file, return false. (They either both need to be files, or
+ // neither)
if (isFile1 ^ isFile2)
return false;
return getExternalForm(url1).equals(getExternalForm(url2));
}
/**
- * Gets the external form of this URL. In particular, it trims any white space,
+ * Gets the external form of this URL. In particular, it trims any white space,
* removes a trailing slash and creates a lower case string.
*/
private static String getExternalForm(URL url) {
@@ -89,8 +90,8 @@ public class SiteBundle {
}
/**
- * Adds the name of a category this bundle belongs to.
- * Throws a runtime exception if this object is marked read-only.
+ * Adds the name of a category this bundle belongs to. Throws a runtime
+ * exception if this object is marked read-only.
*
* @param categoryName category name
*/
@@ -111,16 +112,16 @@ public class SiteBundle {
try {
url = new URL(base, urlString);
} catch (MalformedURLException e) {
- // UpdateCore.warn("", e); //$NON-NLS-1$
+ // UpdateCore.warn("", e); //$NON-NLS-1$
}
}
/**
* Compares 2 bundle reference models for equality
- *
+ *
* @param object bundle reference model to compare with
- * @return <code>true</code> if the two models are equal,
- * <code>false</code> otherwise
+ * @return <code>true</code> if the two models are equal, <code>false</code>
+ * otherwise
*/
@Override
public boolean equals(Object object) {
@@ -147,9 +148,6 @@ public class SiteBundle {
return sameURL(this.getURL(), that.getURL());
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
@@ -159,7 +157,7 @@ public class SiteBundle {
if (this.getURL() == null)
return result;
- if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
+ if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
// If the URL is a file, then create the HashCode from the file
File f = new File(getURL().getFile());
if (f != null)
@@ -194,15 +192,15 @@ public class SiteBundle {
/**
* Returns the bundle version as a string
*
- * @return bundle version
+ * @return bundle version
*/
public String getBundleVersion() {
return bundleVersion;
}
/**
- * Retrieve the displayable label for the bundle reference. If the model
- * object has been resolved, the label is localized.
+ * Retrieve the displayable label for the bundle reference. If the model object
+ * has been resolved, the label is localized.
*
* @return displayable label, or <code>null</code>.
*/
@@ -266,8 +264,8 @@ public class SiteBundle {
/**
* Returns the referenced bundle type.
*
- * @return bundle type, or <code>null</code> representing the default
- * bundle type for the site
+ * @return bundle type, or <code>null</code> representing the default bundle
+ * type for the site
*/
public String getType() {
return type;
@@ -302,14 +300,13 @@ public class SiteBundle {
}
/**
- * Resolve the model object.
- * Any URL strings in the model are resolved relative to the
- * base URL argument. Any translatable strings in the model that are
- * specified as translation keys are localized using the supplied
- * resource bundle.
+ * Resolve the model object. Any URL strings in the model are resolved relative
+ * to the base URL argument. Any translatable strings in the model that are
+ * specified as translation keys are localized using the supplied resource
+ * bundle.
*
* @param resolveBase URL
- * @param bundleURL resource bundle URL
+ * @param bundleURL resource bundle URL
* @exception MalformedURLException
*/
public void resolve(URL resolveBase, URL bundleURL) throws MalformedURLException {
@@ -317,8 +314,8 @@ public class SiteBundle {
}
/**
- * Sets the system architecture specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the system architecture specification. Throws a runtime exception if
+ * this object is marked read-only.
*
* @param arch system architecture specification as a comma-separated list
*/
@@ -327,8 +324,8 @@ public class SiteBundle {
}
/**
- * Sets the names of categories this bundle belongs to.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the names of categories this bundle belongs to. Throws a runtime
+ * exception if this object is marked read-only.
*
* @param categoryNames an array of category names
*/
@@ -340,8 +337,8 @@ public class SiteBundle {
}
/**
- * Sets the bundle identifier.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the bundle identifier. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param bundleId bundle identifier
*/
@@ -350,8 +347,8 @@ public class SiteBundle {
}
/**
- * Sets the bundle version.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the bundle version. Throws a runtime exception if this object is marked
+ * read-only.
*
* @param bundleVersion bundle version
*/
@@ -361,6 +358,7 @@ public class SiteBundle {
/**
* Sets the label.
+ *
* @param label The label to set
*/
public void setLabel(String label) {
@@ -368,8 +366,8 @@ public class SiteBundle {
}
/**
- * Sets the locale specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the locale specification. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param nl locale specification as a comma-separated list
*/
@@ -378,8 +376,8 @@ public class SiteBundle {
}
/**
- * Sets the operating system specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the operating system specification. Throws a runtime exception if this
+ * object is marked read-only.
*
* @param os operating system specification as a comma-separated list
*/
@@ -395,8 +393,8 @@ public class SiteBundle {
}
/**
- * Sets the site for the referenced.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the site for the referenced. Throws a runtime exception if this object
+ * is marked read-only.
*
* @param site site for the reference
*/
@@ -405,8 +403,8 @@ public class SiteBundle {
}
/**
- * Sets the referenced bundle type.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the referenced bundle type. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param type referenced bundle type
*/
@@ -415,8 +413,8 @@ public class SiteBundle {
}
/**
- * Sets the unresolved URL for the bundle reference.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the unresolved URL for the bundle reference. Throws a runtime exception
+ * if this object is marked read-only.
*
* @param urlString unresolved URL string
*/
@@ -426,8 +424,8 @@ public class SiteBundle {
}
/**
- * Sets the windowing system specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the windowing system specification. Throws a runtime exception if this
+ * object is marked read-only.
*
* @param ws windowing system specification as a comma-separated list
*/
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
index 1bfaed79c..c1a72eb88 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java
@@ -64,14 +64,15 @@ public class SiteFeature {
File file2 = new File(url2.getFile());
return file1.equals(file2);
}
- // URL1 xor URL2 is a file, return false. (They either both need to be files, or neither)
+ // URL1 xor URL2 is a file, return false. (They either both need to be files, or
+ // neither)
if (isFile1 ^ isFile2)
return false;
return getExternalForm(url1).equals(getExternalForm(url2));
}
/**
- * Gets the external form of this URL. In particular, it trims any white space,
+ * Gets the external form of this URL. In particular, it trims any white space,
* removes a trailing slash and creates a lower case string.
*/
private static String getExternalForm(URL url) {
@@ -95,8 +96,8 @@ public class SiteFeature {
}
/**
- * Adds the name of a category this feature belongs to.
- * Throws a runtime exception if this object is marked read-only.
+ * Adds the name of a category this feature belongs to. Throws a runtime
+ * exception if this object is marked read-only.
*
* @param categoryName category name
*/
@@ -117,16 +118,16 @@ public class SiteFeature {
try {
url = new URL(base, urlString);
} catch (MalformedURLException e) {
- // UpdateCore.warn("", e); //$NON-NLS-1$
+ // UpdateCore.warn("", e); //$NON-NLS-1$
}
}
/**
* Compares 2 feature reference models for equality
- *
+ *
* @param object feature reference model to compare with
- * @return <code>true</code> if the two models are equal,
- * <code>false</code> otherwise
+ * @return <code>true</code> if the two models are equal, <code>false</code>
+ * otherwise
*/
@Override
public boolean equals(Object object) {
@@ -153,9 +154,6 @@ public class SiteFeature {
return sameURL(this.getURL(), that.getURL());
}
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
@Override
public int hashCode() {
final int prime = 31;
@@ -165,7 +163,7 @@ public class SiteFeature {
if (this.getURL() == null)
return result;
- if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
+ if ("file".equalsIgnoreCase(getURL().getProtocol())) {//$NON-NLS-1$
// If the URL is a file, then create the HashCode from the file
File f = new File(getURL().getFile());
if (f != null)
@@ -200,15 +198,15 @@ public class SiteFeature {
/**
* Returns the feature version as a string
*
- * @return feature version
+ * @return feature version
*/
public String getFeatureVersion() {
return featureVersion;
}
/**
- * Retrieve the displayable label for the feature reference. If the model
- * object has been resolved, the label is localized.
+ * Retrieve the displayable label for the feature reference. If the model object
+ * has been resolved, the label is localized.
*
* @return displayable label, or <code>null</code>.
*/
@@ -272,8 +270,8 @@ public class SiteFeature {
/**
* Returns the referenced feature type.
*
- * @return feature type, or <code>null</code> representing the default
- * feature type for the site
+ * @return feature type, or <code>null</code> representing the default feature
+ * type for the site
*/
public String getType() {
return type;
@@ -308,14 +306,13 @@ public class SiteFeature {
}
/**
- * Resolve the model object.
- * Any URL strings in the model are resolved relative to the
- * base URL argument. Any translatable strings in the model that are
- * specified as translation keys are localized using the supplied
- * resource bundle.
+ * Resolve the model object. Any URL strings in the model are resolved relative
+ * to the base URL argument. Any translatable strings in the model that are
+ * specified as translation keys are localized using the supplied resource
+ * bundle.
*
* @param resolveBase URL
- * @param bundleURL resource bundle URL
+ * @param bundleURL resource bundle URL
* @exception MalformedURLException
*/
public void resolve(URL resolveBase, URL bundleURL) throws MalformedURLException {
@@ -323,8 +320,8 @@ public class SiteFeature {
}
/**
- * Sets the system architecture specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the system architecture specification. Throws a runtime exception if
+ * this object is marked read-only.
*
* @param arch system architecture specification as a comma-separated list
*/
@@ -333,8 +330,8 @@ public class SiteFeature {
}
/**
- * Sets the names of categories this feature belongs to.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the names of categories this feature belongs to. Throws a runtime
+ * exception if this object is marked read-only.
*
* @param categoryNames an array of category names
*/
@@ -346,8 +343,8 @@ public class SiteFeature {
}
/**
- * Sets the feature identifier.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the feature identifier. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param featureId feature identifier
*/
@@ -356,8 +353,8 @@ public class SiteFeature {
}
/**
- * Sets the feature version.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the feature version. Throws a runtime exception if this object is marked
+ * read-only.
*
* @param featureVersion feature version
*/
@@ -367,6 +364,7 @@ public class SiteFeature {
/**
* Sets the label.
+ *
* @param label The label to set
*/
public void setLabel(String label) {
@@ -374,8 +372,8 @@ public class SiteFeature {
}
/**
- * Sets the locale specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the locale specification. Throws a runtime exception if this object is
+ * marked read-only.
*
* @param nl locale specification as a comma-separated list
*/
@@ -384,8 +382,8 @@ public class SiteFeature {
}
/**
- * Sets the operating system specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the operating system specification. Throws a runtime exception if this
+ * object is marked read-only.
*
* @param os operating system specification as a comma-separated list
*/
@@ -401,8 +399,8 @@ public class SiteFeature {
}
/**
- * Sets the site for the referenced.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the site for the referenced. Throws a runtime exception if this object
+ * is marked read-only.
*
* @param site site for the reference
*/
@@ -411,8 +409,8 @@ public class SiteFeature {
}
/**
- * Sets the referenced feature type.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the referenced feature type. Throws a runtime exception if this object
+ * is marked read-only.
*
* @param type referenced feature type
*/
@@ -421,8 +419,8 @@ public class SiteFeature {
}
/**
- * Sets the unresolved URL for the feature reference.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the unresolved URL for the feature reference. Throws a runtime exception
+ * if this object is marked read-only.
*
* @param urlString unresolved URL string
*/
@@ -432,8 +430,8 @@ public class SiteFeature {
}
/**
- * Sets the windowing system specification.
- * Throws a runtime exception if this object is marked read-only.
+ * Sets the windowing system specification. Throws a runtime exception if this
+ * object is marked read-only.
*
* @param ws windowing system specification as a comma-separated list
*/
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
index 14a45c2c7..d9e1bf4e0 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
@@ -49,13 +49,14 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
public static final String CONFIG_FOLDER = "configuration"; //$NON-NLS-1$
public static final String CONFIGURATOR_FOLDER = "org.eclipse.equinox.simpleconfigurator"; //$NON-NLS-1$
public static final String PROP_KEY_CONFIGURL = "org.eclipse.equinox.simpleconfigurator.configUrl"; //$NON-NLS-1$
- public static final String SHARED_BUNDLES_INFO = CONFIG_FOLDER + File.separatorChar + CONFIGURATOR_FOLDER + File.separatorChar + CONFIG_LIST;
+ public static final String SHARED_BUNDLES_INFO = CONFIG_FOLDER + File.separatorChar + CONFIGURATOR_FOLDER
+ + File.separatorChar + CONFIG_LIST;
private Set<Manipulator> manipulators = new HashSet<>();
- /**
- * Return the ConfiguratorConfigFile which is determined
- * by the parameters set in Manipulator.
+ /**
+ * Return the ConfiguratorConfigFile which is determined by the parameters set
+ * in Manipulator.
*
* @param manipulator
* @return File
@@ -79,7 +80,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
else
baseDir = fwConfigLoc.getParentFile();
else {
- // TODO We need to decide whether launcher data configLocation is the location of a file or a directory
+ // TODO We need to decide whether launcher data configLocation is the location
+ // of a file or a directory
if (fwConfigLoc.getName().endsWith(".ini")) //$NON-NLS-1$
baseDir = fwConfigLoc.getParentFile();
else
@@ -131,18 +133,22 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
for (int i = 0; i < bInfos.length; i++) {
if (isTargetConfiguratorBundle(bInfos[i].getLocation())) {
return true;
- //TODO confirm that startlevel of configurator bundle must be no larger than beginning start level of fw. However, there is no way to know the start level of cached ones.
+ // TODO confirm that startlevel of configurator bundle must be no larger than
+ // beginning start level of fw. However, there is no way to know the start level
+ // of cached ones.
}
}
return false;
}
private static boolean isTargetConfiguratorBundle(URI location) {
- final String symbolic = Utils.getPathFromClause(Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME));
+ final String symbolic = Utils
+ .getPathFromClause(Utils.getManifestMainAttributes(location, Constants.BUNDLE_SYMBOLICNAME));
return (SimpleConfiguratorManipulator.SERVICE_PROP_VALUE_CONFIGURATOR_SYMBOLICNAME.equals(symbolic));
}
- private void algorithm(int initialSl, SortedMap<Integer, List<BundleInfo>> bslToList, BundleInfo configuratorBInfo, List<BundleInfo> setToInitialConfig, List<BundleInfo> setToSimpleConfig, LocationInfo info) {
+ private void algorithm(int initialSl, SortedMap<Integer, List<BundleInfo>> bslToList, BundleInfo configuratorBInfo,
+ List<BundleInfo> setToInitialConfig, List<BundleInfo> setToSimpleConfig, LocationInfo info) {
int configuratorSL = configuratorBInfo.getStartLevel();
Integer sL0 = bslToList.keySet().iterator().next();// StartLevel == 0;
@@ -169,7 +175,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
} else if (sL.intValue() > configuratorSL) {
for (Iterator<BundleInfo> ite2 = list.iterator(); ite2.hasNext();) {
BundleInfo bInfo = ite2.next();
- if (isPrerequisiteBundles(bInfo.getLocation(), info) || isSystemFragmentBundle(bInfo.getLocation(), info))
+ if (isPrerequisiteBundles(bInfo.getLocation(), info)
+ || isSystemFragmentBundle(bInfo.getLocation(), info))
if (!isSystemBundle(bInfo.getLocation(), info))
setToInitialConfig.add(bInfo);
setToSimpleConfig.add(bInfo);
@@ -180,7 +187,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
BundleInfo bInfo = ite2.next();
if (found) {
if (!isSystemBundle(bInfo.getLocation(), info))
- if (isPrerequisiteBundles(bInfo.getLocation(), info) || isSystemFragmentBundle(bInfo.getLocation(), info))
+ if (isPrerequisiteBundles(bInfo.getLocation(), info)
+ || isSystemFragmentBundle(bInfo.getLocation(), info))
setToInitialConfig.add(bInfo);
setToSimpleConfig.add(bInfo);
continue;
@@ -197,7 +205,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
setToInitialConfig.add(configuratorBInfo);
}
- private boolean checkResolve(BundleInfo bInfo, BundlesState state) {//throws ManipulatorException {
+ private boolean checkResolve(BundleInfo bInfo, BundlesState state) {// throws ManipulatorException {
if (bInfo == null)
throw new IllegalArgumentException("bInfo is null."); //$NON-NLS-1$
@@ -211,7 +219,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
return true;
}
- private boolean divideBundleInfos(Manipulator manipulator, List<BundleInfo> setToInitialConfig, List<BundleInfo> setToSimpleConfig, final int initialBSL) {
+ private boolean divideBundleInfos(Manipulator manipulator, List<BundleInfo> setToInitialConfig,
+ List<BundleInfo> setToSimpleConfig, final int initialBSL) {
BundlesState state = manipulator.getBundlesState();
BundleInfo[] targetBundleInfos = null;
if (state.isFullySupported()) {
@@ -299,9 +308,10 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
}
/**
- * Like {@link SimpleConfiguratorImpl#chooseConfigurationURL(URL, URL[])} but it doesn't check
- * file timestamps because if the {@link SimpleConfiguratorImpl#PROP_IGNORE_USER_CONFIGURATION}
- * property is set then we already know that timestamps have been checked and we need to ignore
+ * Like {@link SimpleConfiguratorImpl#chooseConfigurationURL(URL, URL[])} but it
+ * doesn't check file timestamps because if the
+ * {@link SimpleConfiguratorImpl#PROP_IGNORE_USER_CONFIGURATION} property is set
+ * then we already know that timestamps have been checked and we need to ignore
* the user config.
*/
private URL chooseConfigurationURL(String relativePath, URL[] configURL) throws MalformedURLException {
@@ -347,7 +357,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
configURL = chooseConfigurationURL(infoPath, configURLs);
}
- // At this point the file specified by configURL should definitely exist or be null
+ // At this point the file specified by configURL should definitely exist or be
+ // null
if (configURL == null) {
return NULL_BUNDLEINFOS;
}
@@ -372,26 +383,27 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
/*
* InputStream must be closed
- * (non-Javadoc)
- * @see org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator#loadConfiguration(java.io.InputStream, java.net.URI)
*/
@Override
public BundleInfo[] loadConfiguration(InputStream stream, URI installArea) throws IOException {
if (stream == null)
return NULL_BUNDLEINFOS;
- List<org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo> simpleBundles = SimpleConfiguratorUtils.readConfiguration(stream, installArea);
+ List<org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo> simpleBundles = SimpleConfiguratorUtils
+ .readConfiguration(stream, installArea);
// convert to FrameworkAdmin BundleInfo Type
BundleInfo[] result = new BundleInfo[simpleBundles.size()];
int i = 0;
- for (Iterator<org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo> iterator = simpleBundles.iterator(); iterator.hasNext();) {
+ for (Iterator<org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo> iterator = simpleBundles
+ .iterator(); iterator.hasNext();) {
org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo simpleInfo = iterator.next();
URI location = simpleInfo.getLocation();
if (!location.isAbsolute() && simpleInfo.getBaseLocation() != null)
location = URIUtil.makeAbsolute(location, simpleInfo.getBaseLocation());
- BundleInfo bundleInfo = new BundleInfo(simpleInfo.getSymbolicName(), simpleInfo.getVersion(), location, simpleInfo.getStartLevel(), simpleInfo.isMarkedAsStarted());
+ BundleInfo bundleInfo = new BundleInfo(simpleInfo.getSymbolicName(), simpleInfo.getVersion(), location,
+ simpleInfo.getStartLevel(), simpleInfo.isMarkedAsStarted());
bundleInfo.setBaseLocation(simpleInfo.getBaseLocation());
result[i++] = bundleInfo;
}
@@ -400,7 +412,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
@Override
public void saveConfiguration(BundleInfo[] configuration, OutputStream stream, URI installArea) throws IOException {
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
+ org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(
+ configuration, installArea);
SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, stream);
}
@@ -409,7 +422,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
saveConfiguration(configuration, outputFile, installArea, false);
}
- private void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea, boolean backup) throws IOException {
+ private void saveConfiguration(BundleInfo[] configuration, File outputFile, URI installArea, boolean backup)
+ throws IOException {
if (backup && outputFile.exists()) {
File backupFile = Utils.getSimpleDataFormattedFile(outputFile);
if (!outputFile.renameTo(backupFile)) {
@@ -417,7 +431,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
}
}
- org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(configuration, installArea);
+ org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = convertBundleInfos(
+ configuration, installArea);
// if empty remove the configuration file
if (simpleInfos == null || simpleInfos.length == 0) {
@@ -431,7 +446,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
return;
}
SimpleConfiguratorManipulatorUtils.writeConfiguration(simpleInfos, outputFile);
- if (CONFIG_LIST.equals(outputFile.getName()) && installArea != null && isSharedInstallSetup(URIUtil.toFile(installArea), outputFile))
+ if (CONFIG_LIST.equals(outputFile.getName()) && installArea != null
+ && isSharedInstallSetup(URIUtil.toFile(installArea), outputFile))
rememberSharedBundlesInfoTimestamp(installArea, outputFile.getParentFile());
}
@@ -444,8 +460,10 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
return;
Properties timestampToPersist = new Properties();
- timestampToPersist.put(SimpleConfiguratorImpl.KEY_BUNDLESINFO_TIMESTAMP, Long.toString(SimpleConfiguratorUtils.getFileLastModified(sharedBundlesInfo)));
- timestampToPersist.put(SimpleConfiguratorImpl.KEY_EXT_TIMESTAMP, Long.toString(SimpleConfiguratorUtils.getExtendedTimeStamp()));
+ timestampToPersist.put(SimpleConfiguratorImpl.KEY_BUNDLESINFO_TIMESTAMP,
+ Long.toString(SimpleConfiguratorUtils.getFileLastModified(sharedBundlesInfo)));
+ timestampToPersist.put(SimpleConfiguratorImpl.KEY_EXT_TIMESTAMP,
+ Long.toString(SimpleConfiguratorUtils.getExtendedTimeStamp()));
OutputStream os = null;
try {
try {
@@ -461,7 +479,8 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
}
}
- private org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] convertBundleInfos(BundleInfo[] configuration, URI installArea) {
+ private org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] convertBundleInfos(
+ BundleInfo[] configuration, URI installArea) {
// convert to SimpleConfigurator BundleInfo Type
org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[] simpleInfos = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo[configuration.length];
for (int i = 0; i < configuration.length; i++) {
@@ -469,10 +488,12 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
URI location = bundleInfo.getLocation();
if (bundleInfo.getSymbolicName() == null || bundleInfo.getVersion() == null || location == null)
throw new IllegalArgumentException("Cannot persist bundleinfo: " + bundleInfo.toString()); //$NON-NLS-1$
- //only need to make a new BundleInfo if we are changing it.
+ // only need to make a new BundleInfo if we are changing it.
if (installArea != null)
location = URIUtil.makeRelative(location, installArea);
- simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(bundleInfo.getSymbolicName(), bundleInfo.getVersion(), location, bundleInfo.getStartLevel(), bundleInfo.isMarkedAsStarted());
+ simpleInfos[i] = new org.eclipse.equinox.internal.simpleconfigurator.utils.BundleInfo(
+ bundleInfo.getSymbolicName(), bundleInfo.getVersion(), location, bundleInfo.getStartLevel(),
+ bundleInfo.isMarkedAsStarted());
simpleInfos[i].setBaseLocation(bundleInfo.getBaseLocation());
}
return simpleInfos;
@@ -484,13 +505,17 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
List<BundleInfo> setToSimpleConfig = new LinkedList<>();
ConfigData configData = manipulator.getConfigData();
- if (!divideBundleInfos(manipulator, setToInitialConfig, setToSimpleConfig, configData.getInitialBundleStartLevel()))
+ if (!divideBundleInfos(manipulator, setToInitialConfig, setToSimpleConfig,
+ configData.getInitialBundleStartLevel()))
return configData.getBundles();
File outputFile = getConfigFile(manipulator);
- URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI();
- saveConfiguration(setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea, backup);
- configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL, outputFile.toURL().toExternalForm());
+ URI installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()),
+ manipulator.getConfigData().getProperties(), manipulator.getLauncherData()).toURI();
+ saveConfiguration(setToSimpleConfig.toArray(new BundleInfo[setToSimpleConfig.size()]), outputFile, installArea,
+ backup);
+ configData.setProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_CONFIGURL,
+ outputFile.toURL().toExternalForm());
return orderingInitialConfig(setToInitialConfig);
}
@@ -512,7 +537,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
BundleInfo systemBundleInfo = state.getSystemBundle();
if (systemBundleInfo == null) {
// TODO Log
- //throw new IllegalStateException("There is no systemBundle.\n");
+ // throw new IllegalStateException("There is no systemBundle.\n");
return;
}
if (state.isFullySupported())
@@ -556,19 +581,21 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
}
Utils.appendProperties(properties, manipulator.getConfigData().getProperties());
- boolean exclusiveInstallation = Boolean.parseBoolean(properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION));
+ boolean exclusiveInstallation = Boolean.parseBoolean(
+ properties.getProperty(SimpleConfiguratorManipulatorImpl.PROP_KEY_EXCLUSIVE_INSTALLATION));
File configFile = getConfigFile(manipulator);
- File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), manipulator.getConfigData().getProperties(), manipulator.getLauncherData());
+ File installArea = ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()),
+ manipulator.getConfigData().getProperties(), manipulator.getLauncherData());
BundleInfo[] toInstall = new BundleInfo[0];
boolean isShared = isSharedInstallSetup(installArea, configFile);
if (!isShared || (isShared && !hasBaseChanged(installArea.toURI(), configFile.getParentFile()))) {
try {
- //input stream will be closed for us
+ // input stream will be closed for us
toInstall = loadConfiguration(new FileInputStream(configFile), installArea.toURI());
} catch (FileNotFoundException e) {
- //no file, just return an empty list
+ // no file, just return an empty list
toInstall = new BundleInfo[0];
}
}
@@ -590,7 +617,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
try {
bundleState.installBundle(toInstall[i]);
} catch (RuntimeException e) {
- //Ignore
+ // Ignore
}
}
if (exclusiveInstallation)
@@ -616,8 +643,12 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
String rememberedTimestamp;
String extensionTimestsamp;
try {
- rememberedTimestamp = (String) loadProperties(new File(outputFolder, SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO)).get(SimpleConfiguratorImpl.KEY_BUNDLESINFO_TIMESTAMP);
- extensionTimestsamp = (String) loadProperties(new File(outputFolder, SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO)).get(SimpleConfiguratorImpl.KEY_EXT_TIMESTAMP);
+ rememberedTimestamp = (String) loadProperties(
+ new File(outputFolder, SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO))
+ .get(SimpleConfiguratorImpl.KEY_BUNDLESINFO_TIMESTAMP);
+ extensionTimestsamp = (String) loadProperties(
+ new File(outputFolder, SimpleConfiguratorImpl.BASE_TIMESTAMP_FILE_BUNDLESINFO))
+ .get(SimpleConfiguratorImpl.KEY_EXT_TIMESTAMP);
} catch (IOException e) {
return false;
}
@@ -627,11 +658,14 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
File sharedBundlesInfo = new File(URIUtil.append(installArea, SHARED_BUNDLES_INFO));
if (!sharedBundlesInfo.exists())
return true;
- return !(String.valueOf(SimpleConfiguratorUtils.getFileLastModified(sharedBundlesInfo)).equals(rememberedTimestamp) && String.valueOf(SimpleConfiguratorUtils.getExtendedTimeStamp()).equals(extensionTimestsamp));
+ return !(String.valueOf(SimpleConfiguratorUtils.getFileLastModified(sharedBundlesInfo))
+ .equals(rememberedTimestamp)
+ && String.valueOf(SimpleConfiguratorUtils.getExtendedTimeStamp()).equals(extensionTimestsamp));
}
private boolean isSharedInstallSetup(File installArea, File outputFile) {
- //An instance is treated as shared if the bundles.info file is not located in the install area.
+ // An instance is treated as shared if the bundles.info file is not located in
+ // the install area.
return !new File(installArea, SHARED_BUNDLES_INFO).equals(outputFile);
}
@@ -646,7 +680,7 @@ public class SimpleConfiguratorManipulatorImpl implements SimpleConfiguratorMani
if (is != null)
is.close();
} catch (IOException e) {
- //Do nothing
+ // Do nothing
}
is = null;
}
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java
index 5d4c84dad..1df62acb1 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator/src/org/eclipse/equinox/internal/simpleconfigurator/utils/BundleInfo.java
@@ -65,9 +65,6 @@ public class BundleInfo {
this.baseLocation = baseLocation;
}
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
@@ -127,9 +124,10 @@ public class BundleInfo {
if (location == null || other.location == null)
return true;
- //compare absolute location URIs
+ // compare absolute location URIs
URI absoluteLocation = baseLocation == null ? location : URIUtil.append(baseLocation, location.toString());
- URI otherAbsoluteLocation = other.baseLocation == null ? other.location : URIUtil.append(other.baseLocation, other.location.toString());
+ URI otherAbsoluteLocation = other.baseLocation == null ? other.location
+ : URIUtil.append(other.baseLocation, other.location.toString());
return URIUtil.sameURI(absoluteLocation, otherAbsoluteLocation);
}
}

Back to the top