mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git.labs.intellij.net:idea/community
This commit is contained in:
@@ -150,6 +150,8 @@ public class LanguageConsoleImpl implements Disposable, TypeSafeDataProvider {
|
||||
myPanel.removeAll();
|
||||
myPanel.add(myHistoryViewer.getComponent(), BorderLayout.NORTH);
|
||||
myPanel.add(myConsoleEditor.getComponent(), BorderLayout.CENTER);
|
||||
|
||||
myHistoryViewer.setHorizontalScrollbarVisible(false);
|
||||
}
|
||||
else {
|
||||
myPanel.removeAll();
|
||||
@@ -164,6 +166,8 @@ public class LanguageConsoleImpl implements Disposable, TypeSafeDataProvider {
|
||||
if (editorWindow != null) {
|
||||
editorWindow.setFilePinned(virtualFile, true);
|
||||
}
|
||||
|
||||
myHistoryViewer.setHorizontalScrollbarVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.ui.table;
|
||||
|
||||
import com.intellij.Patches;
|
||||
import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.ui.ComponentWithExpandableItems;
|
||||
import com.intellij.ui.ExpandableItemsHandler;
|
||||
import com.intellij.ui.ExpandableItemsHandlerFactory;
|
||||
@@ -203,7 +204,7 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component
|
||||
|
||||
if (myEditorRemover == null) {
|
||||
final KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
|
||||
myEditorRemover = new MyCellEditorRemover(keyboardFocusManager);
|
||||
myEditorRemover = new MyCellEditorRemover();
|
||||
//noinspection HardCodedStringLiteral
|
||||
keyboardFocusManager.addPropertyChangeListener("focusOwner", myEditorRemover);
|
||||
//noinspection HardCodedStringLiteral
|
||||
@@ -268,10 +269,10 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component
|
||||
}
|
||||
|
||||
private final class MyCellEditorRemover implements PropertyChangeListener {
|
||||
private final KeyboardFocusManager myFocusManager;
|
||||
private final IdeFocusManager myFocusManager;
|
||||
|
||||
public MyCellEditorRemover(final KeyboardFocusManager focusManager) {
|
||||
myFocusManager = focusManager;
|
||||
public MyCellEditorRemover() {
|
||||
myFocusManager = IdeFocusManager.findInstanceByComponent(JBTable.this);
|
||||
}
|
||||
|
||||
public void propertyChange(final PropertyChangeEvent e) {
|
||||
@@ -279,20 +280,31 @@ public class JBTable extends JTable implements ComponentWithEmptyText, Component
|
||||
return;
|
||||
}
|
||||
|
||||
Component c = myFocusManager.getFocusOwner();
|
||||
while (c != null) {
|
||||
if (c == JBTable.this) {
|
||||
// focus remains inside the table
|
||||
return;
|
||||
}
|
||||
else if (c instanceof Window) {
|
||||
if (c == SwingUtilities.getWindowAncestor(JBTable.this)) {
|
||||
getCellEditor().stopCellEditing();
|
||||
myFocusManager.doWhenFocusSettlesDown(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!isEditing()) {
|
||||
return;
|
||||
}
|
||||
Component c = myFocusManager.getFocusOwner();
|
||||
while (c != null) {
|
||||
if (c instanceof JPopupMenu) {
|
||||
c = ((JPopupMenu)c).getInvoker();
|
||||
}
|
||||
if (c == JBTable.this) {
|
||||
// focus remains inside the table
|
||||
return;
|
||||
}
|
||||
else if (c instanceof Window) {
|
||||
if (c == SwingUtilities.getWindowAncestor(JBTable.this)) {
|
||||
getCellEditor().stopCellEditing();
|
||||
}
|
||||
break;
|
||||
}
|
||||
c = c.getParent();
|
||||
}
|
||||
break;
|
||||
}
|
||||
c = c.getParent();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.CommonBundle;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@@ -34,6 +35,13 @@ public class SelectDateDialog extends DialogWrapper {
|
||||
pack();
|
||||
}
|
||||
|
||||
public SelectDateDialog(Component component) {
|
||||
super(component, true);
|
||||
init();
|
||||
setTitle(CommonBundle.message("dialog.title.choose.date"));
|
||||
pack();
|
||||
}
|
||||
|
||||
protected JComponent createCenterPanel() {
|
||||
return myPanel;
|
||||
}
|
||||
|
||||
@@ -525,6 +525,14 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable {
|
||||
result = isFocusBeingTransferred() ? null : KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
|
||||
}
|
||||
|
||||
final boolean meaninglessOwner = result instanceof JFrame || result instanceof JDialog || result instanceof JWindow || result instanceof JRootPane;
|
||||
if ((result == null && !isFocusBeingTransferred()) || meaninglessOwner) {
|
||||
final Component permOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner();
|
||||
if (permOwner != null) {
|
||||
result = permOwner;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,17 +85,15 @@ android.browse.instrumentation.class.dialog.title=Select Instrumentation class
|
||||
instrumentation.runner.class.not.specified.error=Instrumentation runner class not specified
|
||||
cannot.find.testcase.error=Cannot find junit.framework.TestCase class
|
||||
logging.level.label=Logging level:
|
||||
android.run.configuration.do.nothing.label=Do not launch Activity
|
||||
android.run.configuration.do.nothing.label=&Do not launch Activity
|
||||
android.debug.port.busy.error=The process debug port is already in use
|
||||
target.package.not.specified.error=Target package is not specified in AndroidManifest.xml
|
||||
android.run.configuration.emulator.options.label=Emulator launch options
|
||||
android.run.configuration.network.spped.label=Network Speed:
|
||||
android.run.configuration.network.latency.label=Network Latency:
|
||||
android.run.configuration.wipe.user.data.label=Wipe user data
|
||||
android.run.configuration.disable.boot.animation.label=Disable boot animation
|
||||
android.run.configuration.command.line.label=Additional command line options
|
||||
android.run.configuration.log.options.title=Logcat options
|
||||
android.run.configuration.logcat.skip.content.label=Clear log before launch
|
||||
android.run.configuration.network.spped.label=&Network Speed:
|
||||
android.run.configuration.network.latency.label=N&etwork Latency:
|
||||
android.run.configuration.wipe.user.data.label=&Wipe user data
|
||||
android.run.configuration.disable.boot.animation.label=Disable &boot animation
|
||||
android.run.configuration.command.line.label=Additional &command line options
|
||||
android.run.configuration.logcat.skip.content.label=&Clear log before launch
|
||||
android.avd.error.title=AVD error
|
||||
cant.load.avds.error.prefix=Cannot reload AVD list:
|
||||
android.platform.label=Android platform:
|
||||
@@ -209,4 +207,8 @@ android.enable.ddms.action.description=Enable/disable DDMS service
|
||||
android.ddms.disabled.error=You have to enable DDMS service to launch debugging. Do you want to do that?
|
||||
android.ddms.disabled.dialog.title=DDMS disabled
|
||||
android.dex.compiler.vm.options.title=Android DX Compiler VM Options
|
||||
android.dex.compiler.configurable.display.name=Android DX Compiler
|
||||
android.dex.compiler.configurable.display.name=Android DX Compiler
|
||||
android.run.configuration.general.tab.title=General
|
||||
android.run.configuration.emulator.tab.title=Emulator
|
||||
android.run.configuration.logcat.tab.title=Logcat
|
||||
android.facet.settings.apk.path.label=APK path:
|
||||
@@ -100,11 +100,11 @@ public class AndroidPackagingCompiler implements PackagingCompiler {
|
||||
if (outputDir != null) {
|
||||
VirtualFile[] externalJars = getExternalJars(module, configuration);
|
||||
String resPackage = AndroidResourcesPackagingCompiler.getOutputPath(module, outputDir);
|
||||
String outputPath = new File(outputDir.getPath(), module.getName() + ".apk").getPath();
|
||||
String outputPath = facet.getApkPath();
|
||||
String classesDexPath = new File(outputDir.getPath(), AndroidUtils.CLASSES_FILE_NAME).getPath();
|
||||
IAndroidTarget target = configuration.getAndroidTarget();
|
||||
String sdkPath = configuration.getSdkPath();
|
||||
if (target != null && sdkPath != null) {
|
||||
if (target != null && sdkPath != null && outputPath != null) {
|
||||
AptPackagingItem item =
|
||||
new AptPackagingItem(sdkPath, manifestFile, resPackage, outputPath, configuration.GENERATE_UNSIGNED_APK);
|
||||
item.setNativeLibsFolders(collectNativeLibsFolders(facet));
|
||||
@@ -271,7 +271,7 @@ public class AndroidPackagingCompiler implements PackagingCompiler {
|
||||
|
||||
@Nullable
|
||||
public ValidityState getValidityState() {
|
||||
return new MyValidityState(myManifestFile, myResPackagePath, myClassesDexPath, myGenerateUnsignedApk, mySourceRoots,
|
||||
return new MyValidityState(myManifestFile, myResPackagePath, myClassesDexPath, myFinalPath, myGenerateUnsignedApk, mySourceRoots,
|
||||
myExternalLibraries, myNativeLibsFolders);
|
||||
}
|
||||
|
||||
@@ -282,6 +282,7 @@ public class AndroidPackagingCompiler implements PackagingCompiler {
|
||||
|
||||
private static class MyValidityState implements ValidityState {
|
||||
private final Map<String, Long> myResourceTimestamps = new HashMap<String, Long>();
|
||||
private final String myApkPath;
|
||||
private final boolean myGenerateUnsignedApk;
|
||||
|
||||
MyValidityState(DataInput is) throws IOException {
|
||||
@@ -292,11 +293,13 @@ public class AndroidPackagingCompiler implements PackagingCompiler {
|
||||
myResourceTimestamps.put(key, value);
|
||||
}
|
||||
myGenerateUnsignedApk = is.readBoolean();
|
||||
myApkPath = is.readUTF();
|
||||
}
|
||||
|
||||
MyValidityState(VirtualFile manifestFile,
|
||||
String resPackagePath,
|
||||
String classesDexPath,
|
||||
String apkPath,
|
||||
boolean generateUnsignedApk,
|
||||
VirtualFile[] sourceRoots,
|
||||
VirtualFile[] externalLibs,
|
||||
@@ -304,6 +307,7 @@ public class AndroidPackagingCompiler implements PackagingCompiler {
|
||||
myResourceTimestamps.put(manifestFile.getPath(), manifestFile.getTimeStamp());
|
||||
myResourceTimestamps.put(FileUtil.toSystemIndependentName(resPackagePath), new File(resPackagePath).lastModified());
|
||||
myResourceTimestamps.put(FileUtil.toSystemIndependentName(classesDexPath), new File(classesDexPath).lastModified());
|
||||
myApkPath = apkPath;
|
||||
myGenerateUnsignedApk = generateUnsignedApk;
|
||||
for (VirtualFile sourceRoot : sourceRoots) {
|
||||
myResourceTimestamps.put(sourceRoot.getPath(), sourceRoot.getTimeStamp());
|
||||
@@ -328,7 +332,9 @@ public class AndroidPackagingCompiler implements PackagingCompiler {
|
||||
return false;
|
||||
}
|
||||
MyValidityState mvs = (MyValidityState)otherState;
|
||||
return mvs.myGenerateUnsignedApk == myGenerateUnsignedApk && mvs.myResourceTimestamps.equals(myResourceTimestamps);
|
||||
return mvs.myGenerateUnsignedApk == myGenerateUnsignedApk &&
|
||||
mvs.myResourceTimestamps.equals(myResourceTimestamps) &&
|
||||
mvs.myApkPath.equals(myApkPath);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -339,6 +345,7 @@ public class AndroidPackagingCompiler implements PackagingCompiler {
|
||||
out.writeLong(entry.getValue());
|
||||
}
|
||||
out.writeBoolean(myGenerateUnsignedApk);
|
||||
out.writeUTF(myApkPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,10 +36,7 @@ import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleUtil;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.DependencyScope;
|
||||
import com.intellij.openapi.roots.LibraryOrderEntry;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
@@ -103,6 +100,17 @@ public class AndroidFacet extends Facet<AndroidFacetConfiguration> {
|
||||
configuration.setFacet(this);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getOutputPackage(@NotNull Module module) {
|
||||
VirtualFile compilerOutput = CompilerModuleExtension.getInstance(module).getCompilerOutputPath();
|
||||
if (compilerOutput == null) return null;
|
||||
return new File(compilerOutput.getPath(), getApkName(module)).getPath();
|
||||
}
|
||||
|
||||
public static String getApkName(Module module) {
|
||||
return module.getName() + ".apk";
|
||||
}
|
||||
|
||||
public void androidPlatformChanged() {
|
||||
myAvdManager = null;
|
||||
myLocalResourceManager = null;
|
||||
@@ -519,11 +527,7 @@ public class AndroidFacet extends Facet<AndroidFacetConfiguration> {
|
||||
public String getAptGenSourceRootPath() {
|
||||
String path = getConfiguration().GEN_FOLDER_RELATIVE_PATH_APT;
|
||||
if (path.length() == 0) return null;
|
||||
String moduleFilePath = getModule().getModuleFilePath();
|
||||
String moduleDirPath = new File(moduleFilePath).getParent();
|
||||
if (moduleDirPath != null) {
|
||||
moduleDirPath = FileUtil.toSystemIndependentName(moduleDirPath);
|
||||
}
|
||||
String moduleDirPath = getModuleDirPath();
|
||||
return moduleDirPath != null ? moduleDirPath + path : null;
|
||||
}
|
||||
|
||||
@@ -532,11 +536,27 @@ public class AndroidFacet extends Facet<AndroidFacetConfiguration> {
|
||||
public String getAidlGenSourceRootPath() {
|
||||
String path = getConfiguration().GEN_FOLDER_RELATIVE_PATH_AIDL;
|
||||
if (path.length() == 0) return null;
|
||||
String moduleDirPath = getModuleDirPath();
|
||||
return moduleDirPath != null ? moduleDirPath + path : null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private String getModuleDirPath() {
|
||||
String moduleFilePath = getModule().getModuleFilePath();
|
||||
String moduleDirPath = new File(moduleFilePath).getParent();
|
||||
if (moduleDirPath != null) {
|
||||
moduleDirPath = FileUtil.toSystemIndependentName(moduleDirPath);
|
||||
}
|
||||
return moduleDirPath != null ? moduleDirPath + path : null;
|
||||
return moduleDirPath;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getApkPath() {
|
||||
String path = getConfiguration().APK_PATH;
|
||||
if (path.length() == 0) {
|
||||
return getOutputPackage(getModule());
|
||||
}
|
||||
String moduleDirPath = getModuleDirPath();
|
||||
return moduleDirPath != null ? FileUtil.toSystemDependentName(moduleDirPath + path) : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ public class AndroidFacetConfiguration implements FacetConfiguration {
|
||||
public boolean USE_CUSTOM_APK_RESOURCE_FOLDER = false;
|
||||
public String CUSTOM_APK_RESOURCE_FOLDER = "";
|
||||
|
||||
public String APK_PATH = "";
|
||||
|
||||
public boolean ADD_ANDROID_LIBRARY = true;
|
||||
|
||||
public boolean LIBRARY_PROJECT = false;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<grid id="27dc6" binding="myContentPanel" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="460" height="510"/>
|
||||
<xy x="20" y="20" width="460" height="545"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -61,7 +61,7 @@
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="b88d3" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="4" left="4" bottom="4" right="4"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Structure"/>
|
||||
</constraints>
|
||||
@@ -177,7 +177,7 @@
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="84519" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="4" left="4" bottom="4" right="4"/>
|
||||
<constraints>
|
||||
<tabbedpane title="Compiler"/>
|
||||
</constraints>
|
||||
@@ -256,7 +256,7 @@
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="3e085" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="3e085" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
@@ -282,18 +282,32 @@
|
||||
</component>
|
||||
<component id="76589" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="myCustomAptSourceDirField">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="b01fc" class="javax.swing.JCheckBox" binding="myGenerateUnsignedApk">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.facet.settings.generate.unsigned.apk"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="2efc8" class="javax.swing.JLabel" binding="myApkPathLabel">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.facet.settings.apk.path.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="db22" class="com.intellij.ui.ComboboxWithBrowseButton" binding="myApkPathCombo">
|
||||
<constraints>
|
||||
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
<vspacer id="e716a">
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.ui.CollectionListModel;
|
||||
import com.intellij.ui.ComboboxWithBrowseButton;
|
||||
import com.intellij.ui.components.JBList;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
@@ -96,6 +97,8 @@ public class AndroidFacetEditorTab extends FacetEditorTab {
|
||||
private JPanel myResOverlayPanel;
|
||||
private JButton myRemoveResOverlayButton;
|
||||
private JCheckBox myGenerateUnsignedApk;
|
||||
private ComboboxWithBrowseButton myApkPathCombo;
|
||||
private JLabel myApkPathLabel;
|
||||
|
||||
public AndroidFacetEditorTab(FacetEditorContext context, AndroidFacetConfiguration androidFacetConfiguration) {
|
||||
final Project project = context.getProject();
|
||||
@@ -226,6 +229,35 @@ public class AndroidFacetEditorTab extends FacetEditorTab {
|
||||
myResOverlayList.setModel(new CollectionListModel(newItems));
|
||||
}
|
||||
});
|
||||
|
||||
myApkPathLabel.setLabelFor(myApkPathCombo);
|
||||
myApkPathCombo.getComboBox().setEditable(true);
|
||||
myApkPathCombo.getComboBox().setModel(new DefaultComboBoxModel(getDefaultApks(module)));
|
||||
myApkPathCombo.addBrowseFolderListener(project, new FileChooserDescriptor(true, false, false, false, false, false) {
|
||||
@Override
|
||||
public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) {
|
||||
if (!super.isFileVisible(file, showHiddenFiles)) {
|
||||
return false;
|
||||
}
|
||||
return file.isDirectory() || "apk".equals(file.getExtension());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static String[] getDefaultApks(@NotNull Module module) {
|
||||
List<String> result = new ArrayList<String>();
|
||||
String path = AndroidFacet.getOutputPackage(module);
|
||||
if (path != null) {
|
||||
result.add(path);
|
||||
}
|
||||
AndroidMavenProvider mavenProvider = AndroidMavenUtil.getMavenProvider();
|
||||
if (mavenProvider != null && mavenProvider.isMavenizedModule(module)) {
|
||||
String buildDirectory = mavenProvider.getBuildDirectory(module);
|
||||
if (buildDirectory != null) {
|
||||
result.add(FileUtil.toSystemDependentName(buildDirectory + '/' + AndroidFacet.getApkName(module)));
|
||||
}
|
||||
}
|
||||
return result.toArray(new String[result.size()]);
|
||||
}
|
||||
|
||||
private boolean isUnderModuleDir(VirtualFile vFile) {
|
||||
@@ -278,6 +310,10 @@ public class AndroidFacetEditorTab extends FacetEditorTab {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (checkRelativePath(myConfiguration.APK_PATH, (String)myApkPathCombo.getComboBox().getEditor().getItem())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (myGenerateRJavaWhenChanged.isSelected() != myConfiguration.REGENERATE_R_JAVA) {
|
||||
return true;
|
||||
}
|
||||
@@ -414,6 +450,14 @@ public class AndroidFacetEditorTab extends FacetEditorTab {
|
||||
}
|
||||
myConfiguration.ASSETS_FOLDER_RELATIVE_PATH = '/' + getAndCheckRelativePath(absAssetsPath, false);
|
||||
|
||||
String absApkPath = (String)myApkPathCombo.getComboBox().getEditor().getItem();
|
||||
if (absResPath.length() == 0) {
|
||||
myConfiguration.APK_PATH = "";
|
||||
}
|
||||
else {
|
||||
myConfiguration.APK_PATH = '/' + getAndCheckRelativePath(absApkPath, false);
|
||||
}
|
||||
|
||||
String absLibsPath = myNativeLibsFolder.getText().trim();
|
||||
if (absLibsPath.length() == 0) {
|
||||
throw new ConfigurationException("Native libs folder not specified");
|
||||
@@ -606,6 +650,10 @@ public class AndroidFacetEditorTab extends FacetEditorTab {
|
||||
myCustomAptSourceDirField.setText(aptSourceAbsPath != null ? aptSourceAbsPath : "");
|
||||
myCustomAptSourceDirField.setEnabled(configuration.USE_CUSTOM_APK_RESOURCE_FOLDER);
|
||||
|
||||
String apkPath = configuration.APK_PATH;
|
||||
String apkAbsPath = apkPath.length() > 0 ? toAbsolutePath(apkPath) : "";
|
||||
myApkPathCombo.getComboBox().getEditor().setItem(apkAbsPath != null ? apkAbsPath : "");
|
||||
|
||||
boolean mavenizedModule = AndroidMavenUtil.isMavenizedModule(myContext.getModule());
|
||||
myCopyResourcesFromArtifacts.setVisible(mavenizedModule);
|
||||
myCopyResourcesFromArtifacts.setSelected(myConfiguration.COPY_RESOURCES_FROM_ARTIFACTS);
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import org.jetbrains.android.facet.AndroidFacetConfiguration;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@@ -34,5 +35,8 @@ public interface AndroidMavenProvider {
|
||||
@NotNull
|
||||
List<File> getMavenDependencyArtifactFiles(@NotNull Module module);
|
||||
|
||||
@Nullable
|
||||
String getBuildDirectory(@NotNull Module module);
|
||||
|
||||
void setPathsToDefault(@NotNull Module module, AndroidFacetConfiguration facetConfiguration);
|
||||
}
|
||||
|
||||
@@ -19,8 +19,10 @@ import com.android.sdklib.SdkConstants;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import org.jetbrains.android.facet.AndroidFacet;
|
||||
import org.jetbrains.android.facet.AndroidFacetConfiguration;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.idea.maven.model.MavenArtifact;
|
||||
import org.jetbrains.idea.maven.project.MavenProject;
|
||||
import org.jetbrains.idea.maven.project.MavenProjectsManager;
|
||||
@@ -46,6 +48,13 @@ public class AndroidMavenProviderImpl implements AndroidMavenProvider {
|
||||
configuration.GEN_FOLDER_RELATIVE_PATH_AIDL = '/' + genRelativePath + "/aidl";
|
||||
}
|
||||
}
|
||||
|
||||
String buildDirectory = FileUtil.toSystemIndependentName(mavenProject.getBuildDirectory());
|
||||
|
||||
if (VfsUtil.isAncestor(new File(moduleDirPath), new File(buildDirectory), true)) {
|
||||
String buildDirRelPath = FileUtil.getRelativePath(moduleDirPath, buildDirectory, '/');
|
||||
configuration.APK_PATH = '/' + buildDirRelPath + '/' + AndroidFacet.getApkName(module);
|
||||
}
|
||||
}
|
||||
|
||||
public static void configureAaptCompilation(MavenProject mavenProject,
|
||||
@@ -87,6 +96,16 @@ public class AndroidMavenProviderImpl implements AndroidMavenProvider {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getBuildDirectory(@NotNull Module module) {
|
||||
MavenProject mavenProject = MavenProjectsManager.getInstance(module.getProject()).findProject(module);
|
||||
if (mavenProject != null) {
|
||||
return mavenProject.getBuildDirectory();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPathsToDefault(@NotNull Module module, AndroidFacetConfiguration facetConfiguration) {
|
||||
MavenProject mavenProject = MavenProjectsManager.getInstance(module.getProject()).findProject(module);
|
||||
|
||||
+144
-106
@@ -1,160 +1,198 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="org.jetbrains.android.run.AndroidRunConfigurationEditor">
|
||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="5" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="416" height="438"/>
|
||||
<xy x="20" y="20" width="430" height="330"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="7f548" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="a005a"/>
|
||||
<text value="&Module:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="a005a" class="javax.swing.JComboBox" binding="myModulesComboBox">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<vspacer id="e5c66">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="46" height="14"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<grid id="64695" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="10">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<tabbedpane id="f3a" binding="myTabbedPane">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="200" height="200"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="917b2" class="javax.swing.JCheckBox" binding="myChooseDeviceManually">
|
||||
<grid id="37ff8" layout-manager="GridLayoutManager" row-count="5" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="7" left="7" bottom="7" right="7"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Choose target device manually"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="6765c" class="com.intellij.openapi.ui.LabeledComponent" binding="myChooseAvdComponent">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.ui.ComboboxWithBrowseButton"/>
|
||||
<text value="Prefer Android Virtual Device for deployment"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="e2f80" layout-manager="GridLayoutManager" row-count="5" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="3">
|
||||
<margin top="4" left="4" bottom="4" right="4"/>
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
<tabbedpane title-resource-bundle="messages/AndroidBundle" title-key="android.run.configuration.general.tab.title"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="etched" title-resource-bundle="messages/AndroidBundle" title-key="android.run.configuration.emulator.options.label"/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="a0147" class="com.intellij.openapi.ui.LabeledComponent" binding="myCommandLineComponent">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.ui.RawCommandLineEditor"/>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.command.line.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="75b50" class="javax.swing.JLabel">
|
||||
<component id="7f548" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.network.spped.label"/>
|
||||
<labelFor value="a005a"/>
|
||||
<text value="&Module:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="21170" class="javax.swing.JComboBox" binding="myNetworkSpeedCombo">
|
||||
<vspacer id="ff5d5">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="100" height="-1"/>
|
||||
</grid>
|
||||
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
<component id="a005a" class="javax.swing.JComboBox" binding="myModulesComboBox">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<hspacer id="7a9a5">
|
||||
<component id="917b2" class="javax.swing.JCheckBox" binding="myChooseDeviceManually">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<component id="61ca2" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.network.latency.label"/>
|
||||
<text value="&Choose target device manually"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7cfcb" class="javax.swing.JComboBox" binding="myNetworkLatencyCombo">
|
||||
<component id="6765c" class="com.intellij.openapi.ui.LabeledComponent" binding="myChooseAvdComponent">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="100" height="-1"/>
|
||||
</grid>
|
||||
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.ui.ComboboxWithBrowseButton"/>
|
||||
<text value="&Prefer Android Virtual Device for deployment"/>
|
||||
</properties>
|
||||
</component>
|
||||
<grid id="f6c8d" binding="myConfigurationSpecificPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="8547d" class="javax.swing.JCheckBox" binding="myWipeUserDataCheckBox" default-binding="true">
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="562ef" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<tabbedpane title-resource-bundle="messages/AndroidBundle" title-key="android.run.configuration.emulator.tab.title"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="e2f80" layout-manager="GridLayoutManager" row-count="6" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="3">
|
||||
<margin top="7" left="7" bottom="7" right="7"/>
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="a0147" class="com.intellij.openapi.ui.LabeledComponent" binding="myCommandLineComponent">
|
||||
<constraints>
|
||||
<grid row="4" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<componentClass value="com.intellij.ui.RawCommandLineEditor"/>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.command.line.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="75b50" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="21170"/>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.network.spped.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="21170" class="javax.swing.JComboBox" binding="myNetworkSpeedCombo">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="100" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<hspacer id="7a9a5">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</hspacer>
|
||||
<component id="61ca2" class="javax.swing.JLabel">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="7cfcb"/>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.network.latency.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="7cfcb" class="javax.swing.JComboBox" binding="myNetworkLatencyCombo">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="100" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<component id="8547d" class="javax.swing.JCheckBox" binding="myWipeUserDataCheckBox" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.wipe.user.data.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="cefac" class="javax.swing.JCheckBox" binding="myDisableBootAnimationCombo">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.disable.boot.animation.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<vspacer id="8a59b">
|
||||
<constraints>
|
||||
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
</vspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="79366" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="7" left="7" bottom="7" right="7"/>
|
||||
<constraints>
|
||||
<tabbedpane title-resource-bundle="messages/AndroidBundle" title-key="android.run.configuration.logcat.tab.title"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="61933" class="javax.swing.JCheckBox" binding="myClearLogCheckBox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.wipe.user.data.label"/>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.logcat.skip.content.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="cefac" class="javax.swing.JCheckBox" binding="myDisableBootAnimationCombo">
|
||||
<vspacer id="87d8e">
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.disable.boot.animation.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
</vspacer>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
<grid id="f6c8d" binding="myConfigurationSpecificPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="bf582" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="3" column="0" row-span="1" col-span="2" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="etched" title-resource-bundle="messages/AndroidBundle" title-key="android.run.configuration.log.options.title"/>
|
||||
<children>
|
||||
<component id="61933" class="javax.swing.JCheckBox" binding="myClearLogCheckBox">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text resource-bundle="messages/AndroidBundle" key="android.run.configuration.logcat.skip.content.label"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
</grid>
|
||||
</tabbedpane>
|
||||
</children>
|
||||
</grid>
|
||||
<buttonGroups>
|
||||
|
||||
@@ -56,6 +56,7 @@ public class AndroidRunConfigurationEditor<T extends AndroidRunConfigurationBase
|
||||
private JComboBox myNetworkLatencyCombo;
|
||||
private JCheckBox myDisableBootAnimationCombo;
|
||||
private JCheckBox myClearLogCheckBox;
|
||||
private JTabbedPane myTabbedPane;
|
||||
private ComboboxWithBrowseButton myAvdBox;
|
||||
private RawCommandLineEditor myCommandLineField;
|
||||
private String incorrectPreferredAvd;
|
||||
|
||||
@@ -41,11 +41,9 @@ import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.CompilerModuleExtension;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.xdebugger.DefaultDebugProcessHandler;
|
||||
import org.jetbrains.android.ddms.AdbManager;
|
||||
@@ -58,7 +56,6 @@ import org.jetbrains.android.util.AndroidUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
@@ -171,13 +168,6 @@ public abstract class AndroidRunningState implements RunProfileState, AndroidDeb
|
||||
return myEnv.getConfigurationSettings();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getOutputPackage(@NotNull Module module) {
|
||||
VirtualFile compilerOutput = CompilerModuleExtension.getInstance(module).getCompilerOutputPath();
|
||||
if (compilerOutput == null) return null;
|
||||
return new File(compilerOutput.getPath(), module.getName() + ".apk").getPath();
|
||||
}
|
||||
|
||||
public boolean isStopped() {
|
||||
return myStopped;
|
||||
}
|
||||
@@ -565,7 +555,7 @@ public abstract class AndroidRunningState implements RunProfileState, AndroidDeb
|
||||
|
||||
private boolean uploadAndInstall(@NotNull IDevice device, @NotNull String packageName, @NotNull Module module) throws IOException {
|
||||
String remotePath = "/data/local/tmp/" + packageName;
|
||||
String localPath = getOutputPackage(module);
|
||||
String localPath = myFacet.getApkPath();
|
||||
if (!uploadApp(device, remotePath, localPath)) return false;
|
||||
if (!installApp(device, remotePath, packageName)) return false;
|
||||
return true;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<grid row="1" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Launch default Activity"/>
|
||||
<text value="&Launch default Activity"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="8a8dd" class="javax.swing.JRadioButton" binding="myLaunchCustomButton">
|
||||
@@ -27,7 +27,7 @@
|
||||
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Launch:"/>
|
||||
<text value="L&aunch:"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="896e1" class="javax.swing.JRadioButton" binding="myDoNothingButton">
|
||||
|
||||
Reference in New Issue
Block a user