Merge "Clean up: No p2 repos in pom.xml with target-platform-configuration"
authorDavid M. Karr <davidmichaelkarr@gmail.com>
Wed, 18 May 2016 15:56:54 +0000 (15:56 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 18 May 2016 15:56:54 +0000 (15:56 +0000)
15 files changed:
plugins/org.opendaylight.yangide.core.tests/.project
plugins/org.opendaylight.yangide.core/src/org/opendaylight/yangide/core/buffer/BufferManager.java
plugins/org.opendaylight.yangide.core/src/org/opendaylight/yangide/core/indexing/IndexAllProject.java
plugins/org.opendaylight.yangide.core/src/org/opendaylight/yangide/core/indexing/IndexManager.java
plugins/org.opendaylight.yangide.ext.model.editor/src/main/java/org/opendaylight/yangide/ext/model/editor/Activator.java
plugins/org.opendaylight.yangide.ext.model.editor/src/main/java/org/opendaylight/yangide/ext/model/editor/editors/YangDiagramEditor.java
plugins/org.opendaylight.yangide.m2e.yang.tests/.project
plugins/org.opendaylight.yangide.ui/.project
plugins/org.opendaylight.yangide.yangparser/.project
plugins/org.opendaylight.yangide.yangparser/META-INF/MANIFEST.MF
product/target-platform/.project
samples/yang-module1/.classpath
samples/yang-module1/pom.xml
samples/yang-module2/.classpath
samples/yang-module2/pom.xml

index 8d222732508c443641850a554c4b1cb967bc3249..5395b2a6b9dca5eef19198f40a4966e7eacecaf2 100644 (file)
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
                <buildCommand>
                        <name>org.eclipse.m2e.core.maven2Builder</name>
                        <arguments>
@@ -30,5 +35,6 @@
                <nature>org.eclipse.m2e.core.maven2Nature</nature>
                <nature>org.eclipse.pde.PluginNature</nature>
                <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
        </natures>
 </projectDescription>
index cb7576bb49038f5cdf3db0e7600b00445d1c5dc5..0ea2bc339fd2270341963347bae452a2a87139c3 100644 (file)
@@ -12,8 +12,9 @@ import java.util.Enumeration;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
-
+import org.eclipse.core.runtime.IStatus;
 import org.opendaylight.yangide.core.IOpenable;
+import org.opendaylight.yangide.core.YangCorePlugin;
 import org.opendaylight.yangide.core.model.YangElement;
 
 /**
@@ -23,7 +24,7 @@ import org.opendaylight.yangide.core.model.YangElement;
 public class BufferManager {
 
     protected static BufferManager DEFAULT_BUFFER_MANAGER;
-    protected static boolean VERBOSE;
+    protected static boolean VERBOSE = false;
 
     /**
      * LRU cache of buffers. The key and value for an entry in the table is the identical buffer.
@@ -36,7 +37,7 @@ public class BufferManager {
     public void addBuffer(IBuffer buffer) {
         if (VERBOSE) {
             String owner = ((YangElement) buffer.getOwner()).toStringWithAncestors();
-            System.out.println("Adding buffer for " + owner); //$NON-NLS-1$
+            YangCorePlugin.log(IStatus.INFO, "Adding buffer for " + owner);
         }
         synchronized (this.openBuffers) {
             this.openBuffers.put(buffer.getOwner(), buffer);
@@ -44,8 +45,7 @@ public class BufferManager {
         // close buffers that were removed from the cache if space was needed
         this.openBuffers.closeBuffers();
         if (VERBOSE) {
-            System.out
-                    .println("-> Buffer cache filling ratio = " + NumberFormat.getInstance().format(this.openBuffers.fillingRatio()) + "%"); //$NON-NLS-1$//$NON-NLS-2$
+            YangCorePlugin.log(IStatus.INFO, "-> Buffer cache filling ratio = " + NumberFormat.getInstance().format(this.openBuffers.fillingRatio()) + "%"); //$NON-NLS-1$//$NON-NLS-2$
         }
     }
 
index ce76442e1c150d5c85dc4b7e6b0e60aeb8097155..dadc81c7f658b7045d4be5a58f784ba00bba817f 100644 (file)
@@ -9,18 +9,18 @@ package org.opendaylight.yangide.core.indexing;
 
 import java.io.IOException;
 import java.util.HashSet;
+import java.util.Set;
 import java.util.jar.JarFile;
 import java.util.zip.ZipEntry;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.IPackageFragmentRoot;
@@ -57,7 +57,7 @@ public class IndexAllProject extends IndexRequest {
 
     @Override
     public boolean execute(IProgressMonitor progressMonitor) {
-        System.err.println("[I] Project: " + project.getName());
+        YangCorePlugin.log(IStatus.INFO, "[I] Project: " + project.getName());
 
         if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) {
             return true;
@@ -66,17 +66,16 @@ public class IndexAllProject extends IndexRequest {
         if (!this.project.isAccessible()) {
             return true;
         }
-        final HashSet<IPath> ignoredPath = new HashSet<IPath>();
-        final HashSet<IPath> externalJarsPath = new HashSet<IPath>();
+        final Set<IPath> ignoredPath = new HashSet<>();
+        final Set<IPath> externalJarsPath = new HashSet<>();
         try {
             JavaProject proj = (JavaProject) JavaCore.create(project);
-            final HashSet<String> projectScope = new HashSet<>();
+            final Set<String> projectScope = new HashSet<>();
             projectScope.add(project.getName());
 
             if (proj != null) {
                 IClasspathEntry[] classpath = proj.getResolvedClasspath();
-                for (int i = 0, length = classpath.length; i < length; i++) {
-                    IClasspathEntry entry = classpath[i];
+                for (IClasspathEntry entry : classpath) {
                     IPath entryPath = entry.getPath();
                     IPath output = entry.getOutputLocation();
                     if (output != null && !entryPath.equals(output)) {
@@ -94,8 +93,8 @@ public class IndexAllProject extends IndexRequest {
                     }
                 }
                 IPackageFragmentRoot[] roots = proj.getAllPackageFragmentRoots();
-                for (int i = 0, length = roots.length; i < length; i++) {
-                    IPath entryPath = roots[i].getPath();
+                for (IPackageFragmentRoot root : roots) {
+                    IPath entryPath = root.getPath();
                     if (entryPath != null && entryPath.toFile().exists()
                             && entryPath.lastSegment().toLowerCase().endsWith(".jar")) {
                         externalJarsPath.add(entryPath);
@@ -105,7 +104,7 @@ public class IndexAllProject extends IndexRequest {
                 YangProjectInfo yangProjectInfo = (YangProjectInfo) YangCorePlugin.create(project).getElementInfo(null);
                 yangProjectInfo.setProjectScope(projectScope);
                 // fill indirect scope
-                HashSet<String> indirectScope = new HashSet<String>();
+                Set<String> indirectScope = new HashSet<>();
                 indirectScope.add(project.getName());
                 for (IJavaProject jproj : JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects()) {
                     if (jproj != proj) {
@@ -133,25 +132,22 @@ public class IndexAllProject extends IndexRequest {
             }
         }
         try {
-            final HashSet<IFile> indexedFiles = new HashSet<IFile>();
-            project.accept(new IResourceProxyVisitor() {
-                @Override
-                public boolean visit(IResourceProxy proxy) {
-                    if (IndexAllProject.this.isCancelled) {
-                        return false;
-                    }
-                    if (!ignoredPath.isEmpty() && ignoredPath.contains(proxy.requestFullPath())) {
-                        return false;
-                    }
-                    if (proxy.getType() == IResource.FILE) {
-                        if (CoreUtil.isYangLikeFileName(proxy.getName())) {
-                            IFile file = (IFile) proxy.requestResource();
-                            indexedFiles.add(file);
-                        }
-                        return false;
+            final HashSet<IFile> indexedFiles = new HashSet<>();
+            project.accept(proxy -> {
+                if (IndexAllProject.this.isCancelled) {
+                    return false;
+                }
+                if (!ignoredPath.isEmpty() && ignoredPath.contains(proxy.requestFullPath())) {
+                    return false;
+                }
+                if (proxy.getType() == IResource.FILE) {
+                    if (CoreUtil.isYangLikeFileName(proxy.getName())) {
+                        IFile file = (IFile) proxy.requestResource();
+                        indexedFiles.add(file);
                     }
-                    return true;
+                    return false;
                 }
+                return true;
             }, IResource.NONE);
 
             for (IFile iFile : indexedFiles) {
index a1a2b1e92bfb83017c6c26365866bcf2fb77c14d..a942d0011217dc76c6614ddf4f98c809c3267ee2 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.mapdb.DB;
 import org.mapdb.DBMaker;
@@ -131,13 +132,7 @@ public class IndexManager extends JobManager {
         if (this.db != null) {
             this.db.close();
         }
-        File[] files = indexFile.getParentFile().listFiles(new FilenameFilter() {
-
-            @Override
-            public boolean accept(File dir, String name) {
-                return name.startsWith("index") && (cleanAll || !name.startsWith("index_" + INDEX_VERSION));
-            }
-        });
+        File[] files = indexFile.getParentFile().listFiles((FilenameFilter) (dir, name) -> name.startsWith("index") && (cleanAll || !name.startsWith("index_" + INDEX_VERSION)));
         if (files != null) {
             for (File file : files) {
                 file.delete();
@@ -175,7 +170,7 @@ public class IndexManager extends JobManager {
         Iterable<Long> it = Fun.filter(idxResources, file.getProject().getName(), file.getFullPath().toString());
         for (Long modStamp : it) {
             if (modStamp == file.getModificationStamp()) {
-                System.err.println("[x] " + file);
+                YangCorePlugin.log(IStatus.INFO, "[x] " + file);
                 return;
             }
         }
@@ -191,7 +186,7 @@ public class IndexManager extends JobManager {
         Iterable<Long> it = Fun.filter(idxResources, project.getName(), file.toString());
         for (Long modStamp : it) {
             if (modStamp == file.toFile().lastModified()) {
-                System.err.println("[x] " + file);
+                YangCorePlugin.log(IStatus.INFO, "[x] " + file);
                 return;
             }
         }
@@ -268,15 +263,14 @@ public class IndexManager extends JobManager {
     }
 
     public synchronized void addElementIndexInfo(ElementIndexInfo info) {
-        System.err.println("[I] " + info.getModule() + "@" + info.getRevision() + " - " + info.getName() + " - "
-                + info.getType());
-        idxKeywords.add(Fun.t6(info.getModule(), info.getRevision(), info.getName(), info.getType(), info.getPath(),
-                info));
+        YangCorePlugin.log(IStatus.INFO,
+                "[I] " + info.getModule() + "@" + info.getRevision() + " - " + info.getName() + " - " + info.getType());
+        idxKeywords.add(Fun.t6(info.getModule(), info.getRevision(), info.getName(), info.getType(), info.getPath(), info));
     }
 
     public synchronized void addElementIndexReferenceInfo(ElementIndexReferenceInfo info) {
-        System.err.println("[IR] " + info.getReference() + " : " + info.getType() + " - " + info.getProject() + "@"
-                + info.getPath());
+        YangCorePlugin.log(IStatus.INFO,
+                "[IR] " + info.getReference() + " : " + info.getType() + " - " + info.getProject() + "@" + info.getPath());
         idxReferences.add(Fun.t4(info.getReference(), info.getType(), info.getPath(), info));
     }
 
@@ -393,11 +387,11 @@ public class IndexManager extends JobManager {
         }
 
         String  nameWithoutPrefix   = name;
-        int colonIndex  = nameWithoutPrefix != null ? nameWithoutPrefix.indexOf(':') : -1; 
+        int colonIndex  = nameWithoutPrefix != null ? nameWithoutPrefix.indexOf(':') : -1;
         if (colonIndex != -1) {
             nameWithoutPrefix   = nameWithoutPrefix.substring(colonIndex + 1);
         }
-        
+
         for (Tuple6<String, String, String, ElementIndexType, String, ElementIndexInfo> entry : idxKeywords) {
             if (module != null && module.length() > 0 && !module.equals(entry.a)) {
                 continue;
@@ -424,7 +418,7 @@ public class IndexManager extends JobManager {
             }
 
             if (infos == null) {
-                infos = new ArrayList<ElementIndexInfo>();
+                infos = new ArrayList<>();
             }
             infos.add(entry.f);
         }
@@ -450,7 +444,7 @@ public class IndexManager extends JobManager {
         }
 
         String  nameWithoutPrefix   = reference.getName();
-        int colonIndex  = nameWithoutPrefix != null ? nameWithoutPrefix.indexOf(':') : -1; 
+        int colonIndex  = nameWithoutPrefix != null ? nameWithoutPrefix.indexOf(':') : -1;
         if (colonIndex != -1) {
             nameWithoutPrefix   = nameWithoutPrefix.substring(colonIndex + 1);
         }
@@ -478,7 +472,7 @@ public class IndexManager extends JobManager {
             }
 
             if (infos == null) {
-                infos = new ArrayList<ElementIndexReferenceInfo>();
+                infos = new ArrayList<>();
             }
 
             if (!infos.contains(entry.d)) {
index d46b15b562dccfec04234124e176186382a11c09..eed5271658b29aaf7f24d307bff5a87434b91d73 100644 (file)
@@ -104,4 +104,14 @@ public class Activator extends AbstractUIPlugin {
     public static void log(IStatus status) {
         getDefault().getLog().log(status);
     }
+    
+    /**
+     * Reports log to Error Log view.
+     *
+     * @param statusErrorID plugin related error ID
+     * @param message error message
+     */
+    public static void log(int statusErrorID, String message) {
+        log(new Status(statusErrorID, PLUGIN_ID, message));
+    }
 }
index 1eed581a917c4b9393b4642252d81254c9589fd5..ddc59b13ce80e0bc497bca204cb2f00494807fc0 100644 (file)
@@ -8,6 +8,7 @@
 package org.opendaylight.yangide.ext.model.editor.editors;
 
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.emf.ecore.EAttribute;
@@ -45,6 +46,7 @@ import org.opendaylight.yangide.editor.editors.YangEditor;
 import org.opendaylight.yangide.ext.model.ModelPackage;
 import org.opendaylight.yangide.ext.model.Module;
 import org.opendaylight.yangide.ext.model.Node;
+import org.opendaylight.yangide.ext.model.editor.Activator;
 import org.opendaylight.yangide.ext.model.editor.diagram.EditorFeatureProvider;
 import org.opendaylight.yangide.ext.model.editor.util.DiagramImportSupport;
 import org.opendaylight.yangide.ext.model.editor.util.LayoutUtil;
@@ -67,7 +69,9 @@ public class YangDiagramEditor extends DiagramEditor {
 
         @Override
         public void nodeRemoved(Node node) {
-            System.out.println("Removed " + node);
+            if (Activator.getDefault().isDebugging()) {
+                Activator.log(IStatus.INFO, "Removed " + node);
+            }
             PictogramElement[] elements = getDiagramTypeProvider().getFeatureProvider()
                     .getAllPictogramElementsForBusinessObject(node);
             for (PictogramElement element : elements) {
@@ -80,7 +84,9 @@ public class YangDiagramEditor extends DiagramEditor {
 
         @Override
         public void nodeChanged(Node node, EObject object, Object newValue) {
-            System.out.println("Changed " + node);
+            if (Activator.getDefault().isDebugging()) {
+                Activator.log(IStatus.INFO, "Changed " + node);
+            }
             if (object instanceof EAttribute) {
                 PictogramElement pe = YangModelUIUtil.getBusinessObjectPropShape(
                         getDiagramTypeProvider().getFeatureProvider(), node, (EAttribute) object);
@@ -93,7 +99,9 @@ public class YangDiagramEditor extends DiagramEditor {
 
         @Override
         public void nodeAdded(Node parent, Node child, int position) {
-            System.out.println("Added " + child);
+            if (Activator.getDefault().isDebugging()) {
+                Activator.log(IStatus.INFO, "Added " + child);
+            }
             if (null == YangModelUIUtil.getBusinessObjectShape(getDiagramTypeProvider().getFeatureProvider(), child)) {
                 Point p = null;
                 if (parent instanceof Module) {
@@ -187,13 +195,8 @@ public class YangDiagramEditor extends DiagramEditor {
         super.initializeGraphicalViewer();
         GraphicalViewer graphicalViewer = getGraphicalViewer();
         if (graphicalViewer != null) {
-            graphicalViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-                @Override
-                public void selectionChanged(SelectionChangedEvent event) {
-                    ((YangDiagramBehavior) getDiagramBehavior()).getYangPaletteBehavior()
-                            .updateSelection(event.getSelection());
-                }
-            });
+            graphicalViewer.addSelectionChangedListener(event -> ((YangDiagramBehavior) getDiagramBehavior()).getYangPaletteBehavior()
+            .updateSelection(event.getSelection()));
         }
         sourceSelectionUpdater = new SourceSelectionUpdater();
     }
@@ -220,7 +223,7 @@ public class YangDiagramEditor extends DiagramEditor {
                                     .getConnectionReferenceSubjectClass(notification.getNotifier());
                             if (null != type) {
                                 getDiagramBehavior().getEditingDomain().getCommandStack()
-                                        .execute(new RecordingCommand(getDiagramBehavior().getEditingDomain()) {
+                                .execute(new RecordingCommand(getDiagramBehavior().getEditingDomain()) {
 
                                     @Override
                                     protected void doExecute() {
@@ -282,7 +285,7 @@ public class YangDiagramEditor extends DiagramEditor {
 
     public void setSourceModelManager(ISourceModelManager sourceModelManager) {
         ((EditorFeatureProvider) getDiagramTypeProvider().getFeatureProvider())
-                .setSourceModelManager(sourceModelManager);
+        .setSourceModelManager(sourceModelManager);
         this.sourceModelManager = sourceModelManager;
     }
 
@@ -295,8 +298,9 @@ public class YangDiagramEditor extends DiagramEditor {
      */
     public void startSourceSelectionUpdater() {
         GraphicalViewer graphicalViewer = getGraphicalViewer();
-        if (graphicalViewer != null)
+        if (graphicalViewer != null) {
             graphicalViewer.addSelectionChangedListener(sourceSelectionUpdater);
+        }
     }
 
     /**
@@ -304,8 +308,9 @@ public class YangDiagramEditor extends DiagramEditor {
      */
     public void stopSourceSelectionUpdater() {
         GraphicalViewer graphicalViewer = getGraphicalViewer();
-        if (graphicalViewer != null)
+        if (graphicalViewer != null) {
             graphicalViewer.removeSelectionChangedListener(sourceSelectionUpdater);
+        }
     }
 
     private class SourceSelectionUpdater implements ISelectionChangedListener {
@@ -314,7 +319,7 @@ public class YangDiagramEditor extends DiagramEditor {
             IStructuredSelection selection = (IStructuredSelection) event.getSelection();
             Object object = selection.getFirstElement();
             if (object instanceof GraphitiShapeEditPart) {
-                PictogramElement element = (PictogramElement) ((GraphitiShapeEditPart) object).getPictogramElement();
+                PictogramElement element = ((GraphitiShapeEditPart) object).getPictogramElement();
                 EObject node = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(element);
                 ASTNode moduleNode = sourceModelManager.getModuleNode((Node) node);
                 IRegion region = YangEditor.getSelectionRegion(moduleNode);
index 733815c064e7d270746fbe71a662d480585a0c1b..ad7d555d28e0949e1535f12d29dc0465078ea18e 100644 (file)
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
                <buildCommand>
                        <name>org.eclipse.m2e.core.maven2Builder</name>
                        <arguments>
@@ -30,5 +35,6 @@
                <nature>org.eclipse.m2e.core.maven2Nature</nature>
                <nature>org.eclipse.pde.PluginNature</nature>
                <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
        </natures>
 </projectDescription>
index aa5df677219b613693230ba9a5da620af0926749..1a914cc680303456306a8df94d08e8c50fd6e047 100644 (file)
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
                <buildCommand>
                        <name>org.eclipse.m2e.core.maven2Builder</name>
                        <arguments>
@@ -30,5 +35,6 @@
                <nature>org.eclipse.m2e.core.maven2Nature</nature>
                <nature>org.eclipse.pde.PluginNature</nature>
                <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
        </natures>
 </projectDescription>
index 374d6cd63a660dff94079f95cec57d4fc4a16bfc..43ee3a21c9f1d13dba0a8e4852b3607c7f064dd4 100644 (file)
                        <arguments>
                        </arguments>
                </buildCommand>
+               <buildCommand>
+                       <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
                <buildCommand>
                        <name>org.eclipse.m2e.core.maven2Builder</name>
                        <arguments>
@@ -30,5 +35,6 @@
                <nature>org.eclipse.m2e.core.maven2Nature</nature>
                <nature>org.eclipse.pde.PluginNature</nature>
                <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
        </natures>
 </projectDescription>
index d6713a0bbaac11f1bdfe5fba5905cbe03c035e52..d9a4e206dffc828ed61aef35aac0949d7b656337 100644 (file)
@@ -29,15 +29,48 @@ Bundle-ClassPath: .,
  libs/guava-18.0.jar
 Bundle-RequiredExecutionEnvironment: JavaSE-1.8
 Bundle-ActivationPolicy: lazy
-Export-Package: com.google.common.base,
- com.google.common.io,
- org.antlr.v4.runtime,
- org.antlr.v4.runtime.atn,
- org.antlr.v4.runtime.dfa,
- org.antlr.v4.runtime.misc,
- org.antlr.v4.runtime.tree,
- org.antlr.v4.runtime.tree.pattern,
- org.antlr.v4.runtime.tree.xpath,
+Export-Package: com.google.common.net;uses:="javax.annotation,com.google
+ .common.base,com.google.common.hash,com.google.common.io,com.google.com
+ mon.primitives,com.google.common.collect,com.google.common.escape";vers
+ ion="18.0.0",com.google.common.html;uses:="com.google.common.escape,jav
+ ax.annotation";version="18.0.0",com.google.common.collect;uses:="com.go
+ ogle.common.base,javax.annotation,com.google.common.primitives,com.goog
+ le.common.math";version="18.0.0",com.google.common.primitives;uses:="co
+ m.google.common.base,javax.annotation,sun.misc";version="18.0.0",com.go
+ ogle.common.base;uses:="javax.annotation";version="18.0.0",com.google.c
+ ommon.escape;uses:="com.google.common.base,javax.annotation";version="1
+ 8.0.0",com.google.common.cache;uses:="com.google.common.collect,com.goo
+ gle.common.util.concurrent,javax.annotation,com.google.common.base,com.
+ google.common.primitives,sun.misc";version="18.0.0",com.google.common.e
+ ventbus;uses:="com.google.common.collect,com.google.common.cache,javax.
+ annotation,com.google.common.base,com.google.common.util.concurrent,com
+ .google.common.reflect";version="18.0.0",com.google.common.util.concurr
+ ent;uses:="com.google.common.base,javax.annotation,com.google.common.co
+ llect,com.google.common.primitives,com.google.common.math";version="18.
+ 0.0",com.google.common.hash;uses:="com.google.common.primitives,com.goo
+ gle.common.base,javax.annotation,com.google.common.math";version="18.0.
+ 0",com.google.common.io;uses:="javax.annotation,com.google.common.base,
+ com.google.common.math,com.google.common.hash,com.google.common.collect
+ ,com.google.common.primitives";version="18.0.0",com.google.common.xml;u
+ ses:="com.google.common.escape,javax.annotation";version="18.0.0",com.g
+ oogle.common.reflect;uses:="javax.annotation,com.google.common.base,com
+ .google.common.collect,com.google.common.primitives";version="18.0.0",c
+ om.google.common.math;uses:="com.google.common.base,com.google.common.p
+ rimitives,javax.annotation";version="18.0.0",com.google.common.annotati
+ ons;version="18.0.0",
+ org.antlr.v4.runtime;uses:="org.antlr.v4.runtime.atn,o
+ rg.antlr.v4.runtime.dfa,org.antlr.v4.runtime.misc,org.antlr.v4.runtim
+ e.tree,org.antlr.v4.runtime.tree.pattern";version="4.5.1",org.antlr.v
+ 4.runtime.atn;uses:="org.antlr.v4.runtime,org.antlr.v4.runtime.dfa,or
+ g.antlr.v4.runtime.misc";version="4.5.1",org.antlr.v4.runtime.dfa;use
+ s:="org.antlr.v4.runtime,org.antlr.v4.runtime.atn";version="4.5.1",or
+ g.antlr.v4.runtime.misc;uses:="org.antlr.v4.runtime";version="4.5.1",
+ org.antlr.v4.runtime.tree;uses:="org.antlr.v4.runtime,org.antlr.v4.ru
+ ntime.misc";version="4.5.1",org.antlr.v4.runtime.tree.pattern;uses:="
+ org.antlr.v4.runtime,org.antlr.v4.runtime.misc,org.antlr.v4.runtime.t
+ ree";version="4.5.1",org.antlr.v4.runtime.tree.xpath;uses:="org.antlr
+ .v4.runtime,org.antlr.v4.runtime.atn,org.antlr.v4.runtime.dfa,org.ant
+ lr.v4.runtime.tree";version="4.5.1",
  org.assertj.core.api,
  org.mockito,
  org.mockito.runners,
index 47b8831d18a3ee7a145f85b99d0bbfa286b081f3..d54deed330429df2427e8b240c7757f35b45058b 100644 (file)
@@ -5,6 +5,11 @@
        <projects>
        </projects>
        <buildSpec>
+               <buildCommand>
+                       <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
                <buildCommand>
                        <name>org.eclipse.m2e.core.maven2Builder</name>
                        <arguments>
@@ -13,5 +18,6 @@
        </buildSpec>
        <natures>
                <nature>org.eclipse.m2e.core.maven2Nature</nature>
+               <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
        </natures>
 </projectDescription>
index c663eb3254c9bf2a81e3c52993372dc33e69ff3d..f1789f8789ab299fc35d3ec5d695e2a8c2b803f0 100644 (file)
                </attributes>
        </classpathentry>
        <classpathentry combineaccessrules="false" kind="src" path="/yang-module2"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
                <attributes>
                        <attribute name="maven.pomderived" value="true"/>
                </attributes>
        </classpathentry>
+       <classpathentry kind="src" output="target/classes" path="src/main/yang">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+                       <attribute name="ignore_optional_problems" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" output="target/classes" path="target/generated-sources/sal">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+                       <attribute name="ignore_optional_problems" value="true"/>
+               </attributes>
+       </classpathentry>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index f26076f5de049aed6e45e0b742e9ac6e65b3a0bd..196fdb5d64210aa05845bf86f1f940d06150e210 100644 (file)
@@ -1,27 +1,31 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
+
        <groupId>yang-test</groupId>
        <artifactId>yang-module1</artifactId>
        <version>0.0.1-SNAPSHOT</version>
-<!-- 
+
        <properties>
-               <maven.compiler.source>1.7</maven.compiler.source>
-               <maven.compiler.target>1.7</maven.compiler.target>
+               <maven.compiler.source>1.8</maven.compiler.source>
+               <maven.compiler.target>1.8</maven.compiler.target>
+               <yangtools.version>1.0.0-SNAPSHOT</yangtools.version>
+               <mdsal.version>0.9.0-SNAPSHOT</mdsal.version>
        </properties>
-        -->
+       
        <dependencies>
                <dependency>
                        <groupId>org.opendaylight.mdsal</groupId>
                        <artifactId>yang-binding</artifactId>
-                       <version>0.8.0-Beryllium</version>
+                       <version>${mdsal.version}</version>
                </dependency>
                <dependency>
                        <groupId>yang-test</groupId>
                        <artifactId>yang-module2</artifactId>
-                       <version>0.0.1-SNAPSHOT</version>
+                       <version>${project.version}</version>
                </dependency>
        </dependencies>
+
        <repositories>
                <repository>
                        <id>opendaylight-release</id>
@@ -34,6 +38,7 @@
                        <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
                </repository>
        </repositories>
+
        <pluginRepositories>
                <pluginRepository>
                        <id>opendaylight-release</id>
                        <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
                </pluginRepository>
        </pluginRepositories>
+       
        <build>
                <plugins>
                        <plugin>
                                <groupId>org.opendaylight.yangtools</groupId>
                                <artifactId>yang-maven-plugin</artifactId>
-                               <version>0.8.0-Beryllium</version>
+                               <version>${yangtools.version}</version>
                                <executions>
                                        <execution>
                                                <id>generate-sources</id>
@@ -74,7 +80,7 @@
                                        <dependency>
                                                <groupId>org.opendaylight.mdsal</groupId>
                                                <artifactId>maven-sal-api-gen-plugin</artifactId>
-                                               <version>0.8.0-Beryllium</version>
+                                               <version>${mdsal.version}</version>
                                        </dependency>
                                </dependencies>
                        </plugin>
index 9959c4b81276923dbbaffc08e1d790b4e536ed04..13a16d526fded7ef93d139e333b5d59c616f3ed1 100644 (file)
                        <attribute name="maven.pomderived" value="true"/>
                </attributes>
        </classpathentry>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+       <classpathentry kind="src" output="target/classes" path="src/main/yang">
+               <attributes>
+                       <attribute name="ignore_optional_problems" value="true"/>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" output="target/classes" path="target/generated-sources/sal">
+               <attributes>
+                       <attribute name="ignore_optional_problems" value="true"/>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
                <attributes>
                        <attribute name="maven.pomderived" value="true"/>
                </attributes>
        </classpathentry>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="output" path="target/classes"/>
 </classpath>
index a3595b1eb20a403a860d083269de58c86caa81fc..1fcc08a4e237b1a8a6c71c7f2f939ab626d26286 100644 (file)
@@ -1,19 +1,25 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
+
   <groupId>yang-test</groupId>
   <artifactId>yang-module2</artifactId>
   <version>0.0.1-SNAPSHOT</version>
+
   <properties>
-    <maven.compiler.source>1.7</maven.compiler.source>
-    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven.compiler.source>1.8</maven.compiler.source>
+    <maven.compiler.target>1.8</maven.compiler.target>
+    <yangtools.version>1.0.0-SNAPSHOT</yangtools.version>
+    <mdsal.version>0.9.0-SNAPSHOT</mdsal.version>
   </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.opendaylight.mdsal</groupId>
       <artifactId>yang-binding</artifactId>
-      <version>0.8.0-Beryllium</version>
+      <version>${mdsal.version}</version>
     </dependency>
   </dependencies>
+
   <repositories>
     <repository>
       <id>opendaylight-release</id>
@@ -26,6 +32,7 @@
       <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
     </repository>
   </repositories>
+
   <pluginRepositories>
     <pluginRepository>
       <id>opendaylight-release</id>
       <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
     </pluginRepository>
   </pluginRepositories>
+
   <build>
     <plugins>
       <plugin>
         <groupId>org.opendaylight.yangtools</groupId>
         <artifactId>yang-maven-plugin</artifactId>
-        <version>0.8.0-Beryllium</version>
+        <version>${yangtools.version}</version>
         <executions>
           <execution>
             <id>generate-sources</id>
@@ -66,7 +74,7 @@
           <dependency>
             <groupId>org.opendaylight.mdsal</groupId>
             <artifactId>maven-sal-api-gen-plugin</artifactId>
-            <version>0.8.0-Beryllium</version>
+            <version>${mdsal.version}</version>
           </dependency>
         </dependencies>
       </plugin>