Fix compilation for case insensitive file systems

This commit is contained in:
Oleg Shpynov
2010-02-01 13:17:08 +03:00
parent f20a350bed
commit f4f185586c
7 changed files with 35 additions and 35 deletions
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.refactoring.extractmethod;
package com.intellij.refactoring.extractMethod;
import com.intellij.codeInsight.codeFragment.CodeFragment;
import com.intellij.openapi.help.HelpManager;
@@ -31,9 +31,9 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodSettings {
public class AbstractExtractMethodDialog extends DialogWrapper implements ExtractMethodSettings {
private JPanel myContentPane;
private ParameterTablePanel myParametersPanel;
private AbstractParameterTablePanel myParametersPanel;
private JTextField myMethodNameTextField;
private JTextArea mySignaturePreviewTextArea;
private JTextArea myOutputVariablesTextArea;
@@ -41,13 +41,13 @@ public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodS
private final ExtractMethodValidator myValidator;
private final ExtractMethodDecorator myDecorator;
private VariableData[] myVariableData;
private Map<String, VariableData> myVariablesMap;
private AbstractVariableData[] myVariableData;
private Map<String, AbstractVariableData> myVariablesMap;
private final List<String> myArguments;
private final ArrayList<String> myOutputVariables;
public ExtractMethodDialog(final Project project,
public AbstractExtractMethodDialog(final Project project,
final String defaultName,
final CodeFragment fragment,
final ExtractMethodValidator validator,
@@ -97,10 +97,10 @@ public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodS
return myMethodNameTextField;
}
public static VariableData[] createVariableData(final List<String> args) {
final VariableData[] datas = new VariableData[args.size()];
public static AbstractVariableData[] createVariableData(final List<String> args) {
final AbstractVariableData[] datas = new AbstractVariableData[args.size()];
for (int i = 0; i < args.size(); i++) {
final VariableData data = new VariableData();
final AbstractVariableData data = new AbstractVariableData();
final String name = args.get(i);
data.originalName = name;
data.name = name;
@@ -110,9 +110,9 @@ public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodS
return datas;
}
public static Map<String, VariableData> createVariableMap(final VariableData[] data) {
final HashMap<String, VariableData> map = new HashMap<String, VariableData>();
for (VariableData variableData : data) {
public static Map<String, AbstractVariableData> createVariableMap(final AbstractVariableData[] data) {
final HashMap<String, AbstractVariableData> map = new HashMap<String, AbstractVariableData>();
for (AbstractVariableData variableData : data) {
map.put(variableData.getOriginalName(), variableData);
}
return map;
@@ -143,9 +143,9 @@ public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodS
}
private void createUIComponents() {
myParametersPanel = new ParameterTablePanel(myValidator){
myParametersPanel = new AbstractParameterTablePanel(myValidator){
protected void doCancelAction() {
ExtractMethodDialog.this.doCancelAction();
AbstractExtractMethodDialog.this.doCancelAction();
}
protected void doEnterAction() {
@@ -154,7 +154,7 @@ public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodS
protected void updateSignature() {
updateOutputVariables();
ExtractMethodDialog.this.updateSignature();
AbstractExtractMethodDialog.this.updateSignature();
}
};
}
@@ -164,7 +164,7 @@ public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodS
boolean first = true;
for (String variable : myOutputVariables) {
if (myVariablesMap!=null){
final VariableData data = myVariablesMap.get(variable);
final AbstractVariableData data = myVariablesMap.get(variable);
final String outputName = data != null ? data.getName() : variable;
if (first){
first = false;
@@ -189,7 +189,7 @@ public class ExtractMethodDialog extends DialogWrapper implements ExtractMethodS
return myMethodNameTextField.getText().trim();
}
public VariableData[] getVariableData() {
public AbstractVariableData[] getVariableData() {
return myVariableData;
}
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.refactoring.extractmethod;
package com.intellij.refactoring.extractMethod;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.TableUtil;
@@ -34,10 +34,10 @@ import java.awt.event.KeyEvent;
/**
* @author oleg
* It`s a modified copy of com.intellij.refactoring.util.ParameterTablePanel
* It`s a modified copy of com.intellij.refactoring.util.AbstractParameterTablePanel
*/
public abstract class ParameterTablePanel extends JPanel {
private VariableData[] myVariableData;
public abstract class AbstractParameterTablePanel extends JPanel {
private AbstractVariableData[] myVariableData;
private Table myTable;
private MyTableModel myTableModel;
@@ -51,11 +51,11 @@ public abstract class ParameterTablePanel extends JPanel {
protected abstract void doCancelAction();
public void setVariableData(VariableData[] variableData) {
public void setVariableData(AbstractVariableData[] variableData) {
myVariableData = variableData;
}
public ParameterTablePanel(final ExtractMethodValidator validator) {
public AbstractParameterTablePanel(final ExtractMethodValidator validator) {
super(new BorderLayout());
myValidator = validator;
}
@@ -72,7 +72,7 @@ public abstract class ParameterTablePanel extends JPanel {
myTable.getColumnModel().getColumn(MyTableModel.PARAMETER_NAME_COLUMN).setCellRenderer(new DefaultTableCellRenderer() {
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
VariableData data = myVariableData[row];
AbstractVariableData data = myVariableData[row];
setText(data.name);
return this;
}
@@ -231,7 +231,7 @@ public abstract class ParameterTablePanel extends JPanel {
int targetRow = row + moveIncrement;
if (targetRow < 0 || targetRow >= myVariableData.length) return;
VariableData currentItem = myVariableData[row];
AbstractVariableData currentItem = myVariableData[row];
myVariableData[row] = myVariableData[targetRow];
myVariableData[targetRow] = currentItem;
@@ -286,7 +286,7 @@ public abstract class ParameterTablePanel extends JPanel {
break;
}
case PARAMETER_NAME_COLUMN: {
VariableData data = myVariableData[rowIndex];
AbstractVariableData data = myVariableData[rowIndex];
String name = (String)aValue;
if (myValidator.isValidName(name)) {
data.name = name;
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.refactoring.extractmethod;
package com.intellij.refactoring.extractMethod;
/**
* @author oleg
*/
public class VariableData {
public class AbstractVariableData {
public String originalName;
public String name;
public boolean passAsParameter;
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.refactoring.extractmethod;
package com.intellij.refactoring.extractMethod;
/**
* @author oleg
*/
public interface ExtractMethodDecorator {
String createMethodPreview(String methodName, VariableData[] variableDatas);
String createMethodPreview(String methodName, AbstractVariableData[] variableDatas);
}
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.refactoring.extractmethod;
package com.intellij.refactoring.extractMethod;
/**
* @author oleg
*/
public interface ExtractMethodSettings {
String getMethodName();
VariableData[] getVariableData();
AbstractVariableData[] getVariableData();
}
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.refactoring.extractmethod;
package com.intellij.refactoring.extractMethod;
import org.jetbrains.annotations.Nullable;
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.refactoring.extractmethod.ExtractMethodDialog">
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.refactoring.extractMethod.AbstractExtractMethodDialog">
<grid id="cbd77" binding="myContentPane" layout-manager="GridLayoutManager" row-count="6" 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>
@@ -45,7 +45,7 @@
<properties/>
<border type="etched" title-resource-bundle="org/jetbrains/plugins/ruby/RBundle" title-key="refactoring.extract.method.dialog.parameters"/>
<children>
<component id="d4ee9" class="com.intellij.refactoring.extractmethod.ParameterTablePanel" binding="myParametersPanel" custom-create="true">
<component id="d4ee9" class="com.intellij.refactoring.extractMethod.AbstractParameterTablePanel" binding="myParametersPanel" custom-create="true">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="1" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>