X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Forg.argeo.slc.client.ui.dist%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fdist%2Feditors%2FModuleEditorInput.java;h=8c297259eb839c45e56f3f0c286ebc94aa1d8831;hb=48b6f7647f12f4b96d1914bcafc95efd7f43cc43;hp=bc15959dcf3c323c589f2d0b5a739e596c95e09f;hpb=2ecb1e7ce15a25ba8026b5ded625f36c1be467bd;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java index bc15959dc..8c297259e 100644 --- a/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java +++ b/plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/editors/ModuleEditorInput.java @@ -37,8 +37,9 @@ public class ModuleEditorInput implements IEditorInput, SlcNames { String workspaceName, String artifactPath) { if (workspaceName == null) throw new SlcException("Workspace name cannot be null"); - if (uri == null) - throw new SlcException("URI for repository cannot be null"); + if (uri == null && repoNodePath == null) + throw new SlcException("Define at least one of the 2 " + + "parameters URI or Repo Node Path"); if (artifactPath == null) throw new SlcException("Module path cannot be null"); this.repoNodePath = repoNodePath; @@ -105,12 +106,15 @@ public class ModuleEditorInput implements IEditorInput, SlcNames { return false; if (!workspaceName.equals(other.getWorkspaceName())) return false; - if (!uri.equals(other.getUri())) + + if (uri == null && other.getUri() != null + || !uri.equals(other.getUri())) + return false; + + if (repoNodePath == null && other.getRepoNodePath() != null + || !repoNodePath.equals(other.getRepoNodePath())) return false; - if (repoNodePath == null) - return other.getRepoNodePath() == null; - else - return repoNodePath.equals(other.getRepoNodePath()); + return true; } } \ No newline at end of file