device-admin as the root tag of the XML resource that\n" +
- "describes a\n" +
- " {@link android.app.admin.DeviceAdminReceiver}, which is\n" +
- " referenced from its\n" +
- " {@link android.app.admin.DeviceAdminReceiver#DEVICE_ADMIN_META_DATA}\n" +
- " meta-data entry. Described here are the attributes that can be\n" +
- " included in that tag.");
+ JavadocParser.build(
+ "tag",
+ "Use device-admin as the root tag of the XML resource that\n" +
+ "describes a\n" +
+ " {@link android.app.admin.DeviceAdminReceiver}, which is\n" +
+ " referenced from its\n" +
+ " {@link android.app.admin.DeviceAdminReceiver#DEVICE_ADMIN_META_DATA}\n" +
+ " meta-data entry. Described here are the attributes that can be\n" +
+ " included in that tag."));
private static final String NAME_KEY = "fragment.name";
@Override
diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java b/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java
index a087b5511066..41c8ab813f2e 100644
--- a/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java
+++ b/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java
@@ -25,6 +25,7 @@ import com.intellij.designer.propertyTable.renderers.LabelPropertyRenderer;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.psi.xml.XmlTag;
import com.intellij.util.ArrayUtil;
+import com.intellij.android.designer.propertyTable.JavadocParser;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -35,6 +36,8 @@ public class CenterProperty extends Property").append(title).append(" - ");
+
+ for (String tag : TAGS) {
+ javadoc = convertLink(javadoc, tag);
+ }
+
+ javadoc = javadoc.replaceAll("", "");
+ javadoc = javadoc.replaceAll("", "");
+
+ buffer.append(javadoc);
+
+ return buffer.append("").toString();
+ }
+
+ private static String convertLink(String javadoc, String tag) {
+ StringBuilder buffer = new StringBuilder();
+ int length = javadoc.length();
+ int start = 0;
+
+ while (true) {
+ int index = javadoc.indexOf(tag, start);
+
+ if (index == -1) {
+ buffer.append(javadoc.substring(start, length));
+ break;
+ }
+ else {
+ buffer.append(javadoc.substring(start, index));
+
+ int linkStart = index + tag.length();
+ int end = javadoc.indexOf('}', linkStart);
+ String linkValue = javadoc.substring(linkStart, end).trim();
+ String href;
+ String text;
+
+ int spaceIndex = linkValue.indexOf(' ');
+ if (spaceIndex != -1) {
+ href = linkValue.substring(0, spaceIndex);
+ text = linkValue.substring(spaceIndex + 1);
+ }
+ else {
+ href = text = linkValue;
+ }
+
+ text = text.replace('#', '.');
+
+ DocumentationManager.createHyperlink(buffer, href, text, true);
+
+ start = end + 1;
+ }
+ }
+
+ return buffer.toString();
+ }
+}
\ No newline at end of file
diff --git a/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidFacet.groovy b/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidFacet.groovy
index d7d04ba87dab..7f9d3dddb6a9 100644
--- a/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidFacet.groovy
+++ b/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidFacet.groovy
@@ -92,7 +92,7 @@ class AndroidFacet extends Facet {
}
if (lookInContentRoot) {
- module.contentRoots.each {String contentRoot ->
+ for (String contentRoot in module.contentRoots) {
def absPath = FileUtil.toSystemIndependentName(contentRoot + relativePath)
def f = new File(absPath)
diff --git a/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidSourceGeneratingBuilder.java b/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidSourceGeneratingBuilder.java
index c982ef16a5ae..265845566c92 100644
--- a/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidSourceGeneratingBuilder.java
+++ b/plugins/android/jps-plugin/src/org/jetbrains/jps/android/AndroidSourceGeneratingBuilder.java
@@ -584,6 +584,7 @@ public class AndroidSourceGeneratingBuilder extends ModuleLevelBuilder {
if (!FileUtil.moveDirWithContent(tmpOutputDir, aptOutputDirectory)) {
context.processMessage(new CompilerMessage(ANDROID_APT_COMPILER, BuildMessage.Kind.ERROR, AndroidJpsBundle
.message("android.jps.errors.cannot.move.content", tmpOutputDir.getPath(), aptOutputDirectory.getPath())));
+ success = false;
continue;
}
markDirtyRecursively(aptOutputDirectory, context, ANDROID_APT_COMPILER);
diff --git a/plugins/android/src/org/jetbrains/android/facet/AndroidFacetConfiguration.java b/plugins/android/src/org/jetbrains/android/facet/AndroidFacetConfiguration.java
index 350ba76c09e4..254d6b90beb2 100644
--- a/plugins/android/src/org/jetbrains/android/facet/AndroidFacetConfiguration.java
+++ b/plugins/android/src/org/jetbrains/android/facet/AndroidFacetConfiguration.java
@@ -27,7 +27,6 @@ import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.util.DefaultJDOMExternalizer;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.WriteExternalException;
-import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import org.jdom.Element;
@@ -97,15 +96,10 @@ public class AndroidFacetConfiguration implements FacetConfiguration {
}
public void init(@NotNull Module module, @NotNull String baseDirectoryPath) {
- String moduleDirPath = AndroidRootUtil.getModuleDirPath(module);
- if (moduleDirPath == null) {
+ final String s = AndroidRootUtil.getPathRelativeToModuleDir(module, baseDirectoryPath);
+ if (s == null || s.length() == 0) {
return;
}
- if (moduleDirPath.equals(baseDirectoryPath)) {
- return;
- }
-
- String s = FileUtil.getRelativePath(moduleDirPath, baseDirectoryPath, '/');
GEN_FOLDER_RELATIVE_PATH_APT = '/' + s + GEN_FOLDER_RELATIVE_PATH_APT;
GEN_FOLDER_RELATIVE_PATH_AIDL = '/' + s + GEN_FOLDER_RELATIVE_PATH_AIDL;
diff --git a/plugins/android/src/org/jetbrains/android/facet/AndroidRootUtil.java b/plugins/android/src/org/jetbrains/android/facet/AndroidRootUtil.java
index c24eed85f9a6..6eeb95037884 100644
--- a/plugins/android/src/org/jetbrains/android/facet/AndroidRootUtil.java
+++ b/plugins/android/src/org/jetbrains/android/facet/AndroidRootUtil.java
@@ -514,4 +514,16 @@ public class AndroidRootUtil {
String moduleDirPath = getModuleDirPath(facet.getModule());
return moduleDirPath != null ? FileUtil.toSystemDependentName(moduleDirPath + path) : null;
}
+
+ @Nullable
+ public static String getPathRelativeToModuleDir(@NotNull Module module, @NotNull String path) {
+ String moduleDirPath = getModuleDirPath(module);
+ if (moduleDirPath == null) {
+ return null;
+ }
+ if (moduleDirPath.equals(path)) {
+ return "";
+ }
+ return FileUtil.getRelativePath(moduleDirPath, path, '/');
+ }
}
diff --git a/plugins/android/src/org/jetbrains/android/maven/AndroidFacetImporterBase.java b/plugins/android/src/org/jetbrains/android/maven/AndroidFacetImporterBase.java
index 2eaa9968d45e..7aa809d188e1 100644
--- a/plugins/android/src/org/jetbrains/android/maven/AndroidFacetImporterBase.java
+++ b/plugins/android/src/org/jetbrains/android/maven/AndroidFacetImporterBase.java
@@ -389,9 +389,13 @@ public abstract class AndroidFacetImporterBase extends FacetImporter