Skip to content

Commit

Permalink
Adaptation plugin for work under Android Studio(remove use Kotlin, sa…
Browse files Browse the repository at this point in the history
…ve boolean value as String)
  • Loading branch information
Serhiy Kyrylyuk committed Oct 16, 2015
1 parent 016ec71 commit a491e85
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 92 deletions.
72 changes: 0 additions & 72 deletions src/com/dd/FoldingConfigurable.kt

This file was deleted.

23 changes: 23 additions & 0 deletions src/com/dd/FoldingNode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.dd;

import com.intellij.ide.projectView.PresentationData;
import com.intellij.ide.projectView.ViewSettings;
import com.intellij.ide.projectView.impl.nodes.PsiFileNode;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiFile;

class FoldingNode extends PsiFileNode {
private String mName;

public FoldingNode(Project project, PsiFile value, ViewSettings viewSettings, String shortName) {
super(project, value, viewSettings);
mName = shortName;
}

@Override
protected void updateImpl(PresentationData presentationData) {
super.updateImpl(presentationData);

presentationData.setPresentableText(mName);
}
}
17 changes: 0 additions & 17 deletions src/com/dd/FoldingNode.kt

This file was deleted.

6 changes: 3 additions & 3 deletions src/com/dd/SettingConfigurable.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ public boolean isModified() {

@Override
public void apply() throws ConfigurationException {
PropertiesComponent.getInstance().setValue(PREFIX_CUSTOM_USE, useCustomPatternCheckBox.isSelected());
PropertiesComponent.getInstance().setValue(PREFIX_CUSTOM_USE, Boolean.valueOf(useCustomPatternCheckBox.isSelected()).toString());
PropertiesComponent.getInstance().setValue(PREFIX_PATTERN, customPattern.getText());
PropertiesComponent.getInstance().setValue(PREFIX_HIDE, hideFoldingPrefix.isSelected());
PropertiesComponent.getInstance().setValue(PREFIX_HIDE, Boolean.valueOf(hideFoldingPrefix.isSelected()).toString());

isModified = false;
}
Expand All @@ -108,7 +108,7 @@ public void reset() {
final boolean customPrefix = PropertiesComponent.getInstance().getBoolean(PREFIX_CUSTOM_USE, false);
useCustomPatternCheckBox.setSelected(customPrefix);
customPattern.setEnabled(customPrefix);
customPattern.setText(PropertiesComponent.getInstance().getValue(PREFIX_PATTERN));
customPattern.setText(PropertiesComponent.getInstance().getValue(PREFIX_PATTERN, DEFAULT_PATTERN_DOUBLE));
hideFoldingPrefix.getModel().setSelected(PropertiesComponent.getInstance().getBoolean(PREFIX_HIDE, false));
}

Expand Down

0 comments on commit a491e85

Please sign in to comment.