Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 463a704

Browse files
#2427 inline generated form code
1 parent 4bbfe35 commit 463a704

17 files changed

+774
-79
lines changed

‎src/main/java/fr/adrienbrault/idea/symfony2plugin/SettingsForm.java‎

Lines changed: 134 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
1212
import com.intellij.openapi.vfs.VfsUtil;
1313
import com.intellij.openapi.vfs.VirtualFile;
14+
import com.intellij.uiDesigner.core.GridConstraints;
15+
import com.intellij.uiDesigner.core.GridLayoutManager;
16+
import com.intellij.uiDesigner.core.Spacer;
17+
import com.jgoodies.forms.layout.CellConstraints;
18+
import com.jgoodies.forms.layout.FormLayout;
1419
import fr.adrienbrault.idea.symfony2plugin.stubs.util.IndexUtil;
1520
import fr.adrienbrault.idea.symfony2plugin.util.IdeHelper;
1621
import fr.adrienbrault.idea.symfony2plugin.util.ProjectUtil;
@@ -21,6 +26,7 @@
2126
import org.jetbrains.annotations.Nullable;
2227

2328
import javax.swing.*;
29+
import java.awt.*;
2430
import java.awt.event.ActionEvent;
2531
import java.awt.event.MouseAdapter;
2632
import java.awt.event.MouseEvent;
@@ -126,21 +132,21 @@ public void mouseClicked(MouseEvent e) {
126132
public boolean isModified() {
127133
return
128134
!pluginEnabled.isSelected() == getSettings().pluginEnabled
129-
|| !pathToTranslationRootTextField.getText().equals(getSettings().pathToTranslation)
130-
|| !enableSchedulerCheckBox.isSelected() == getSettings().remoteDevFileScheduler
131-
132-
|| !codeFoldingPhpRoute.isSelected() == getSettings().codeFoldingPhpRoute
133-
|| !codeFoldingPhpModel.isSelected() == getSettings().codeFoldingPhpModel
134-
|| !codeFoldingPhpTemplate.isSelected() == getSettings().codeFoldingPhpTemplate
135-
|| !codeFoldingTwigRoute.isSelected() == getSettings().codeFoldingTwigRoute
136-
|| !codeFoldingTwigTemplate.isSelected() == getSettings().codeFoldingTwigTemplate
137-
|| !codeFoldingTwigConstant.isSelected() == getSettings().codeFoldingTwigConstant
138-
|| !featureTwigIcon.isSelected() == getSettings().featureTwigIcon
139-
|| !featureTypeProvider.isSelected() == getSettings().featureTypeProvider
140-
141-
|| !directoryToApp.getText().equals(getSettings().directoryToApp)
142-
|| !directoryToWeb.getText().equals(getSettings().directoryToWeb)
143-
;
135+
|| !pathToTranslationRootTextField.getText().equals(getSettings().pathToTranslation)
136+
|| !enableSchedulerCheckBox.isSelected() == getSettings().remoteDevFileScheduler
137+
138+
|| !codeFoldingPhpRoute.isSelected() == getSettings().codeFoldingPhpRoute
139+
|| !codeFoldingPhpModel.isSelected() == getSettings().codeFoldingPhpModel
140+
|| !codeFoldingPhpTemplate.isSelected() == getSettings().codeFoldingPhpTemplate
141+
|| !codeFoldingTwigRoute.isSelected() == getSettings().codeFoldingTwigRoute
142+
|| !codeFoldingTwigTemplate.isSelected() == getSettings().codeFoldingTwigTemplate
143+
|| !codeFoldingTwigConstant.isSelected() == getSettings().codeFoldingTwigConstant
144+
|| !featureTwigIcon.isSelected() == getSettings().featureTwigIcon
145+
|| !featureTypeProvider.isSelected() == getSettings().featureTypeProvider
146+
147+
|| !directoryToApp.getText().equals(getSettings().directoryToApp)
148+
|| !directoryToWeb.getText().equals(getSettings().directoryToWeb)
149+
;
144150
}
145151

146152
@Override
@@ -251,4 +257,117 @@ public static void show(@NotNull Project project) {
251257
ShowSettingsUtilImpl.showSettingsDialog(project, "Symfony2.SettingsForm", null);
252258
}
253259

260+
{
261+
// GUI initializer generated by IntelliJ IDEA GUI Designer
262+
// >>> IMPORTANT!! <<<
263+
// DO NOT EDIT OR ADD ANY CODE HERE!
264+
$$$setupUI$$$();
265+
}
266+
267+
/**
268+
* Method generated by IntelliJ IDEA GUI Designer
269+
* >>> IMPORTANT!! <<<
270+
* DO NOT edit this method OR call it in your code!
271+
*
272+
* @noinspection ALL
273+
*/
274+
private void $$$setupUI$$$() {
275+
panel1 = new JPanel();
276+
panel1.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));
277+
final JPanel panel2 = new JPanel();
278+
panel2.setLayout(new FormLayout("fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:d:grow,left:4dlu:noGrow,fill:max(d;4px):noGrow,left:4dlu:noGrow,fill:max(d;4px):noGrow", "center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:6dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow"));
279+
panel1.add(panel2, new GridConstraints(1, 0, 1, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
280+
directoryToWebLabel = new JLabel();
281+
directoryToWebLabel.setText("Web Directory");
282+
CellConstraints cc = new CellConstraints();
283+
panel2.add(directoryToWebLabel, cc.xy(1, 3));
284+
directoryToWeb = new TextFieldWithBrowseButton();
285+
panel2.add(directoryToWeb, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));
286+
directoryToWebReset = new JButton();
287+
directoryToWebReset.setText("Default");
288+
panel2.add(directoryToWebReset, cc.xy(5, 3));
289+
final JLabel label1 = new JLabel();
290+
label1.setText("Translation Root Path");
291+
panel2.add(label1, cc.xy(1, 1));
292+
pathToTranslationRootTextField = new TextFieldWithBrowseButton();
293+
panel2.add(pathToTranslationRootTextField, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));
294+
pathToTranslationRootTextFieldReset = new JButton();
295+
pathToTranslationRootTextFieldReset.setText("Default");
296+
panel2.add(pathToTranslationRootTextFieldReset, cc.xy(5, 1));
297+
final JLabel label2 = new JLabel();
298+
label2.setText("Code Folding");
299+
panel2.add(label2, cc.xy(3, 9));
300+
codeFoldingPhpRoute = new JCheckBox();
301+
codeFoldingPhpRoute.setText("Route (PHP)");
302+
panel2.add(codeFoldingPhpRoute, cc.xy(3, 11));
303+
codeFoldingPhpModel = new JCheckBox();
304+
codeFoldingPhpModel.setText("Repository Entity (PHP)");
305+
panel2.add(codeFoldingPhpModel, cc.xy(3, 13));
306+
codeFoldingTwigRoute = new JCheckBox();
307+
codeFoldingTwigRoute.setText("Route (Twig)");
308+
panel2.add(codeFoldingTwigRoute, cc.xy(3, 17));
309+
codeFoldingPhpTemplate = new JCheckBox();
310+
codeFoldingPhpTemplate.setText("Template (PHP)");
311+
panel2.add(codeFoldingPhpTemplate, cc.xy(3, 15));
312+
codeFoldingTwigTemplate = new JCheckBox();
313+
codeFoldingTwigTemplate.setText("Template (Twig)");
314+
panel2.add(codeFoldingTwigTemplate, cc.xy(3, 19));
315+
codeFoldingTwigConstant = new JCheckBox();
316+
codeFoldingTwigConstant.setText("Constant (Twig)");
317+
panel2.add(codeFoldingTwigConstant, cc.xy(3, 21));
318+
enableSchedulerCheckBox = new JCheckBox();
319+
enableSchedulerCheckBox.setText("Enable 5min scheduler (reopen Project after change)");
320+
enableSchedulerCheckBox.setMnemonic('S');
321+
enableSchedulerCheckBox.setDisplayedMnemonicIndex(12);
322+
panel2.add(enableSchedulerCheckBox, cc.xy(3, 5));
323+
final JLabel label3 = new JLabel();
324+
label3.setText("Download remote files (exp.)");
325+
panel2.add(label3, cc.xy(1, 5));
326+
final JLabel label4 = new JLabel();
327+
label4.setText("Custom Features");
328+
panel2.add(label4, cc.xy(3, 23));
329+
featureTwigIcon = new JCheckBox();
330+
featureTwigIcon.setText("Twig Icon Decoration");
331+
featureTwigIcon.setToolTipText("Decorate Twig file icons with layer to show possible content type");
332+
panel2.add(featureTwigIcon, cc.xy(3, 25));
333+
directoryToAppLabel = new JLabel();
334+
directoryToAppLabel.setText("App Directory");
335+
panel2.add(directoryToAppLabel, cc.xy(1, 31));
336+
directoryToApp = new TextFieldWithBrowseButton();
337+
panel2.add(directoryToApp, cc.xy(3, 31, CellConstraints.FILL, CellConstraints.DEFAULT));
338+
directoryToAppReset = new JButton();
339+
directoryToAppReset.setText("Default");
340+
panel2.add(directoryToAppReset, cc.xy(5, 31));
341+
final JLabel label5 = new JLabel();
342+
label5.setText("Legacy Features");
343+
panel2.add(label5, cc.xy(1, 29));
344+
featureTypeProvider = new JCheckBox();
345+
featureTypeProvider.setText("Type Provider");
346+
featureTypeProvider.setToolTipText("Resolve return type via parameter eg \"ContainerInterface::get, EntityManager::find\"");
347+
panel2.add(featureTypeProvider, cc.xy(3, 27));
348+
pluginEnabled = new JCheckBox();
349+
pluginEnabled.setText("Enable for Project (needs restart)");
350+
panel1.add(pluginEnabled, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
351+
buttonHelp = new JButton();
352+
buttonHelp.setHorizontalAlignment(0);
353+
buttonHelp.setHorizontalTextPosition(4);
354+
buttonHelp.setText("Project Page / Documentation");
355+
panel1.add(buttonHelp, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
356+
buttonReindex = new JButton();
357+
buttonReindex.setText("Clear Index");
358+
panel1.add(buttonReindex, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
359+
final Spacer spacer1 = new Spacer();
360+
panel1.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
361+
buttonAutoConfigure = new JButton();
362+
buttonAutoConfigure.setText("Auto Configure");
363+
panel1.add(buttonAutoConfigure, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
364+
}
365+
366+
/**
367+
* @noinspection ALL
368+
*/
369+
public JComponent $$$getRootComponent$$$() {
370+
return panel1;
371+
}
372+
254373
}

‎src/main/java/fr/adrienbrault/idea/symfony2plugin/profiler/ui/ProfilerSettingsDialog.form‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<grid id="27dc6" binding="mainPanel" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
44
<margin top="0" left="0" bottom="0" right="0"/>
55
<constraints>
6-
<xy x="20" y="20" width="570" height="400"/>
6+
<xy x="20" y="20" width="665" height="400"/>
77
</constraints>
88
<properties/>
99
<border type="none"/>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /