android converter migrated to new api

This commit is contained in:
Nikolay Chashnikov
2009-09-01 11:00:08 +04:00
parent 392e441c1d
commit 70ca861ca2
2 changed files with 32 additions and 5 deletions
@@ -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);
}
}