Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java')
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java
new file mode 100644
index 00000000..e46218be
--- /dev/null
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/views/nodes/LocalRepositoryNode.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010 Sonatype, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.m2e.core.ui.internal.views.nodes;
+
+import org.eclipse.m2e.core.internal.Messages;
+import org.eclipse.m2e.core.internal.index.NexusIndex;
+import org.eclipse.m2e.core.repository.IRepository;
+
+/**
+ * LocalRepositoryNode
+ *
+ * @author igor
+ */
+public class LocalRepositoryNode extends AbstractIndexedRepositoryNode {
+
+ public LocalRepositoryNode(NexusIndex index) {
+ super(index);
+ }
+
+ public String getName() {
+ IRepository repository = index.getRepository();
+ StringBuilder sb = new StringBuilder();
+ sb.append(Messages.LocalRepositoryNode_local);
+ if (repository.getBasedir() != null) {
+ sb.append(" (").append(repository.getBasedir().getAbsolutePath()).append(')'); //$NON-NLS-1$
+ }
+ return sb.toString();
+ }
+}

Back to the top