diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/OrderRootType.java b/platform/projectModel-api/src/com/intellij/openapi/roots/OrderRootType.java
index af67b753eb2c..6fe05ade2034 100644
--- a/platform/projectModel-api/src/com/intellij/openapi/roots/OrderRootType.java
+++ b/platform/projectModel-api/src/com/intellij/openapi/roots/OrderRootType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,15 +17,17 @@ package com.intellij.openapi.roots;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.extensions.Extensions;
-import org.jetbrains.annotations.NonNls;
-import org.jetbrains.annotations.NotNull;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
/**
* Root types that can be queried from OrderEntry.
- * @see OrderEntry
+ *
* @author dsl
+ * @see OrderEntry
*/
public class OrderRootType {
private final String myName;
@@ -35,29 +37,30 @@ public class OrderRootType {
protected static PersistentOrderRootType[] ourPersistentOrderRootTypes = new PersistentOrderRootType[0];
- protected OrderRootType(@NonNls String name) {
+ protected OrderRootType(String name) {
myName = name;
}
/**
- * Classpath without output directories for modules.
- * Includes:
- *
classes roots for libraries and jdk
- * recursively for module dependencies: only exported items
+ * Classpath without output directories for modules. Includes:
+ *
+ * - classes roots for libraries and jdk
+ * - recursively for module dependencies: only exported items
+ *
*/
public static final OrderRootType CLASSES = new PersistentOrderRootType("CLASSES", "classPath", null, "classPathEntry");
/**
- * Sources.
- * Includes:
- * production and test source roots for modules
- * source roots for libraries and jdk
- * recursively for module dependencies: only exported items
+ * Sources. Includes:
+ *
+ * - production and test source roots for modules
+ * - source roots for libraries and jdk
+ * - recursively for module dependencies: only exported items
+ *
*/
public static final OrderRootType SOURCES = new PersistentOrderRootType("SOURCES", "sourcePath", null, "sourcePathEntry");
/**
- * Documentation.
* Generic documentation order root type
*/
public static final OrderRootType DOCUMENTATION = new DocumentationRootType();
@@ -67,19 +70,14 @@ public class OrderRootType {
* cases if supported by LibraryType.
*/
public static class DocumentationRootType extends OrderRootType {
-
public DocumentationRootType() {
super("DOCUMENTATION");
}
-
+
@Override
public boolean skipWriteIfEmpty() {
return true;
}
-
- public String getSdkRootName() {
- return "documentation";
- }
}
public String name() {
@@ -117,13 +115,13 @@ public class OrderRootType {
protected static T getOrderRootType(final Class extends T> orderRootTypeClass) {
OrderRootType[] rootTypes = Extensions.getExtensions(EP_NAME);
- for(OrderRootType rootType: rootTypes) {
+ for (OrderRootType rootType : rootTypes) {
if (orderRootTypeClass.isInstance(rootType)) {
- //noinspection unchecked
- return (T)rootType;
+ @SuppressWarnings("unchecked") T t = (T)rootType;
+ return t;
}
}
- assert false : "Root type "+orderRootTypeClass+" not found. All roots: "+ Arrays.asList(rootTypes);
+ assert false : "Root type " + orderRootTypeClass + " not found. All roots: " + Arrays.asList(rootTypes);
return null;
}
@@ -139,4 +137,4 @@ public class OrderRootType {
public String toString() {
return "Root " + name();
}
-}
+}
\ No newline at end of file