mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
android converter migrated to new api
This commit is contained in:
@@ -8,7 +8,6 @@ import com.intellij.conversion.impl.ui.ProjectConversionWizard;
|
||||
import com.intellij.ide.IdeBundle;
|
||||
import com.intellij.ide.impl.convert.ProjectConversionUtil;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.components.StorageScheme;
|
||||
import com.intellij.openapi.components.impl.stores.IProjectStore;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -211,10 +210,7 @@ public class ConversionServiceImpl extends ConversionService {
|
||||
|
||||
public boolean convertModule(@NotNull final Project project, @NotNull final File moduleFile) {
|
||||
final IProjectStore stateStore = ((ProjectImpl)project).getStateStore();
|
||||
String projectPath = FileUtil.toSystemDependentName(stateStore.getProjectFilePath());
|
||||
if (stateStore.getStorageScheme() != StorageScheme.DEFAULT) {
|
||||
projectPath = new File(projectPath).getParent();
|
||||
}
|
||||
String projectPath = FileUtil.toSystemDependentName(stateStore.getLocation());
|
||||
|
||||
if (!isConversionNeeded(projectPath, moduleFile)) {
|
||||
return false;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.intellij.ide.dnd;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public class DndLock extends JFrame {
|
||||
private final static Object[][] TABLE_DATA = new Object[][] {
|
||||
new Object[] {new Integer(1), "Red"},
|
||||
new Object[] {new Integer(2), "Green"},
|
||||
new Object[] {new Integer(2), "Blue"}
|
||||
};
|
||||
private final static String[] TABLE_COLUMNS = new String[] {
|
||||
"Index", "Color"
|
||||
};
|
||||
|
||||
public DndLock() {
|
||||
super("DndLock");
|
||||
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
|
||||
JTable table = new JTable(TABLE_DATA, TABLE_COLUMNS);
|
||||
table.setDragEnabled(true);
|
||||
getContentPane().add(table, BorderLayout.CENTER);
|
||||
setSize(400, 400);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new DndLock().setVisible(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user