本文整理汇总了Java中com.intellij.ui.LanguageTextField类的典型用法代码示例。如果您正苦于以下问题:Java LanguageTextField类的具体用法?Java LanguageTextField怎么用?Java LanguageTextField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LanguageTextField类属于com.intellij.ui包,在下文中一共展示了LanguageTextField类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createUIComponents
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
private void createUIComponents() {
final EditorTextField editorTextField = new LanguageTextField(PlainTextLanguage.INSTANCE, myProject, "") {
@Override
protected EditorEx createEditor() {
final EditorEx editor = super.createEditor();
final PsiFile file = PsiDocumentManager.getInstance(myProject).getPsiFile(editor.getDocument());
if (file != null) {
DaemonCodeAnalyzer.getInstance(myProject).setHighlightingEnabled(file, false);
}
editor.putUserData(ACTIVITY_CLASS_TEXT_FIELD_KEY, ApplicationRunParameters.this);
return editor;
}
};
myActivityField = new ComponentWithBrowseButton<EditorTextField>(editorTextField, null);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ApplicationRunParameters.java
示例2: createUIComponents
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
private void createUIComponents(Project project) {
final EditorTextField editorTextField =
new LanguageTextField(PlainTextLanguage.INSTANCE, project, "") {
@Override
protected EditorEx createEditor() {
final EditorEx editor = super.createEditor();
final PsiFile file =
PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
if (file != null) {
DaemonCodeAnalyzer.getInstance(project).setHighlightingEnabled(file, false);
}
editor.putUserData(
ACTIVITY_CLASS_TEXT_FIELD_KEY, BlazeAndroidBinaryRunConfigurationStateEditor.this);
return editor;
}
};
activityField = new ComponentWithBrowseButton<EditorTextField>(editorTextField, null);
}
开发者ID:bazelbuild,项目名称:intellij,代码行数:20,代码来源:BlazeAndroidBinaryRunConfigurationStateEditor.java
示例3: createCustomPanel
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
@Nullable
@Override
protected JComponent createCustomPanel() {
mySearchQueryField = new LanguageTextField(JqlLanguage.INSTANCE, myProject, myRepository.getSearchQuery());
enableJqlSearchIfSupported();
installListener(mySearchQueryField);
mySearchLabel = new JBLabel("Search:", SwingConstants.RIGHT);
myNoteLabel = new JBLabel();
myNoteLabel.setComponentStyle(UIUtil.ComponentStyle.SMALL);
updateNote();
return FormBuilder.createFormBuilder()
.addLabeledComponent(mySearchLabel, mySearchQueryField)
.addComponentToRightColumn(myNoteLabel)
.getPanel();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:JiraRepositoryEditor.java
示例4: createCustomPanel
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
@Nullable
@Override
protected JComponent createCustomPanel() {
mySearchLabel = new JBLabel("Search:", SwingConstants.RIGHT);
myDefaultSearch = new LanguageTextField(YouTrackLanguage.INSTANCE, myProject, myRepository.getDefaultSearch());
installListener(myDefaultSearch);
return FormBuilder.createFormBuilder().addLabeledComponent(mySearchLabel, myDefaultSearch).getPanel();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:YouTrackRepositoryEditor.java
示例5: createUIComponents
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
private void createUIComponents() {
myValuePattern = new LanguageTextField(RegExpLanguage.INSTANCE, myProject, myOrigInjection.getValuePattern(), new LanguageTextField.SimpleDocumentCreator() {
public void customizePsiFile(PsiFile psiFile) {
psiFile.putCopyableUserData(ValueRegExpAnnotator.KEY, Boolean.TRUE);
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:AdvancedPanel.java
示例6: createUIComponents
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
private void createUIComponents() {
myLanguagePanel = new LanguagePanel(myProject, myOrigInjection);
myTagPanel = new TagPanel(myProject, myOrigInjection);
myAdvancedPanel = new AdvancedXmlPanel(myProject, myOrigInjection);
myLocalName = new LanguageTextField(RegExpLanguage.INSTANCE, myProject, myOrigInjection.getAttributeName());
myNamespace = new ComboBox(200);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:XmlAttributePanel.java
示例7: ConfigUI
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
/**
* Constructor.
*
* @param config Configuration for this UI to display.
* @param project
*/
public ConfigUI(Config config, Project project) {
super(new BorderLayout());
filterFieldName = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterFieldName());
filterFieldType = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterFieldType());
filterMethodName = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterMethodName());
filterMethodType = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterMethodType());
init();
setConfig(config);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:ConfigUI.java
示例8: createCustomPanel
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
@Nullable
@Override
protected JComponent createCustomPanel() {
mySearchQueryField = new LanguageTextField(JqlLanguage.INSTANCE, myProject, myRepository.getSearchQuery());
installListener(mySearchQueryField);
mySearchLabel = new JBLabel("Search:", SwingConstants.RIGHT);
return FormBuilder.createFormBuilder().addLabeledComponent(mySearchLabel, mySearchQueryField).getPanel();
}
开发者ID:consulo,项目名称:consulo-tasks,代码行数:9,代码来源:JiraRepositoryEditor.java
示例9: createUIComponents
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
private void createUIComponents()
{
myLanguagePanel = new LanguagePanel(getProject(), getOrigInjection());
myTagPanel = new TagPanel(getProject(), getOrigInjection());
myAdvancedPanel = new AdvancedXmlPanel(getProject(), getOrigInjection());
myLocalName = new LanguageTextField(RegExpLanguageDelegate.RegExp.get(), getProject(), getOrigInjection().getAttributeName());
myNamespace = new ComboBox(200);
}
开发者ID:consulo,项目名称:consulo-xml,代码行数:11,代码来源:XmlAttributePanel.java
示例10: ConfigUI
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
/**
* Constructor.
*
* @param config Configuration for this UI to display.
* @param project
*/
public ConfigUI(Config config, Project project)
{
super(new BorderLayout());
filterFieldName = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterFieldName());
filterFieldType = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterFieldType());
filterMethodName = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterMethodName());
filterMethodType = new LanguageTextField(RegExpLanguage.INSTANCE, project, config.getFilterMethodType());
init();
setConfig(config);
}
开发者ID:consulo,项目名称:consulo-java,代码行数:17,代码来源:ConfigUI.java
示例11: createNorthPanel
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
protected JComponent createNorthPanel() {
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbConstraints = new GridBagConstraints();
gbConstraints.insets = new Insets(4, 4, 4, 4);
gbConstraints.weighty = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 0;
myRbPackage = new JRadioButton(RefactoringBundle.message("migration.entry.package"));
panel.add(myRbPackage, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 0;
myRbClass = new JRadioButton(RefactoringBundle.message("migration.entry.class"));
panel.add(myRbClass, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 1;
panel.add(new JPanel(), gbConstraints);
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(myRbPackage);
buttonGroup.add(myRbClass);
gbConstraints.weightx = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.NONE;
JLabel oldNamePrompt = new JLabel(RefactoringBundle.message("migration.entry.old.name"));
panel.add(oldNamePrompt, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.weightx = 1;
final LanguageTextField.DocumentCreator documentCreator = new LanguageTextField.DocumentCreator() {
@Override
public Document createDocument(String value, @Nullable Language language, Project project) {
PsiPackage defaultPackage = JavaPsiFacade.getInstance(project).findPackage("");
final JavaCodeFragment fragment =
JavaCodeFragmentFactory.getInstance(project).createReferenceCodeFragment("", defaultPackage, true, true);
return PsiDocumentManager.getInstance(project).getDocument(fragment);
}
};
myOldNameField = new LanguageTextField(JavaLanguage.INSTANCE, myProject, "", documentCreator);
panel.add(myOldNameField, gbConstraints);
gbConstraints.weightx = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.NONE;
JLabel newNamePrompt = new JLabel(RefactoringBundle.message("migration.entry.new.name"));
panel.add(newNamePrompt, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.weightx = 1;
myNewNameField = new LanguageTextField(JavaLanguage.INSTANCE, myProject, "", documentCreator);
panel.setPreferredSize(new Dimension(300, panel.getPreferredSize().height));
panel.add(myNewNameField, gbConstraints);
final DocumentAdapter documentAdapter = new DocumentAdapter() {
@Override
public void documentChanged(DocumentEvent e) {
validateOKButton();
}
};
myOldNameField.getDocument().addDocumentListener(documentAdapter);
myNewNameField.getDocument().addDocumentListener(documentAdapter);
return panel;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:72,代码来源:EditMigrationEntryDialog.java
示例12: createUIComponents
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
private void createUIComponents() {
myLocalName = new LanguageTextField(RegExpLanguage.INSTANCE, myProject, myOrigInjection.getTagName());
myNamespace = new ComboBox(200);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TagPanel.java
示例13: createNorthPanel
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
protected JComponent createNorthPanel() {
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbConstraints = new GridBagConstraints();
gbConstraints.insets = new Insets(4, 4, 4, 4);
gbConstraints.weighty = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 0;
myRbPackage = new JRadioButton(RefactoringBundle.message("migration.entry.package"));
panel.add(myRbPackage, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 0;
myRbClass = new JRadioButton(RefactoringBundle.message("migration.entry.class"));
panel.add(myRbClass, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 1;
panel.add(new JPanel(), gbConstraints);
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(myRbPackage);
buttonGroup.add(myRbClass);
gbConstraints.weightx = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.NONE;
JLabel oldNamePrompt = new JLabel(RefactoringBundle.message("migration.entry.old.name"));
panel.add(oldNamePrompt, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.weightx = 1;
final LanguageTextField.DocumentCreator documentCreator = new LanguageTextField.DocumentCreator() {
@Override
public Document createDocument(String value, @Nullable Language language, Project project) {
PsiPackage defaultPackage = JavaPsiFacade.getInstance(project).findPackage("");
final JavaCodeFragment fragment =
JavaCodeFragmentFactory.getInstance(project).createReferenceCodeFragment("", defaultPackage, true, true);
return PsiDocumentManager.getInstance(project).getDocument(fragment);
}
};
myOldNameField = new LanguageTextField(JavaLanguage.INSTANCE, myProject, "", documentCreator);
panel.add(myOldNameField, gbConstraints);
gbConstraints.weightx = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.NONE;
JLabel newNamePrompt = new JLabel(RefactoringBundle.message("migration.entry.new.name"));
panel.add(newNamePrompt, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.weightx = 1;
myNewNameField = new LanguageTextField(JavaLanguage.INSTANCE, myProject, "", documentCreator);
panel.setPreferredSize(new Dimension(300, panel.getPreferredSize().height));
panel.add(myNewNameField, gbConstraints);
final com.intellij.openapi.editor.event.DocumentAdapter documentAdapter = new com.intellij.openapi.editor.event.DocumentAdapter() {
@Override
public void documentChanged(com.intellij.openapi.editor.event.DocumentEvent e) {
validateOKButton();
}
};
myOldNameField.getDocument().addDocumentListener(documentAdapter);
myNewNameField.getDocument().addDocumentListener(documentAdapter);
return panel;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:72,代码来源:EditMigrationEntryDialog.java
示例14: createUIComponents
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
private void createUIComponents()
{
myLocalName = new LanguageTextField(RegExpLanguageDelegate.RegExp.get(), getProject(), getOrigInjection().getTagName());
myNamespace = new ComboBox(200);
}
开发者ID:consulo,项目名称:consulo-xml,代码行数:6,代码来源:TagPanel.java
示例15: createNorthPanel
import com.intellij.ui.LanguageTextField; //导入依赖的package包/类
@Override
protected JComponent createNorthPanel()
{
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbConstraints = new GridBagConstraints();
gbConstraints.insets = JBUI.insets(4);
gbConstraints.weighty = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 0;
myRbPackage = new JRadioButton(RefactoringBundle.message("migration.entry.package"));
panel.add(myRbPackage, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 0;
myRbClass = new JRadioButton(RefactoringBundle.message("migration.entry.class"));
panel.add(myRbClass, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.BOTH;
gbConstraints.weightx = 1;
panel.add(new JPanel(), gbConstraints);
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(myRbPackage);
buttonGroup.add(myRbClass);
gbConstraints.weightx = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.NONE;
JLabel oldNamePrompt = new JLabel(RefactoringBundle.message("migration.entry.old.name"));
panel.add(oldNamePrompt, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.weightx = 1;
final LanguageTextField.DocumentCreator documentCreator = new LanguageTextField.DocumentCreator()
{
@Override
public Document createDocument(String value, @Nullable Language language, Project project)
{
PsiPackage defaultPackage = JavaPsiFacade.getInstance(project).findPackage("");
final JavaCodeFragment fragment = JavaCodeFragmentFactory.getInstance(project).createReferenceCodeFragment("", defaultPackage, true, true);
return PsiDocumentManager.getInstance(project).getDocument(fragment);
}
};
myOldNameField = new LanguageTextField(JavaLanguage.INSTANCE, myProject, "", documentCreator);
panel.add(myOldNameField, gbConstraints);
gbConstraints.weightx = 0;
gbConstraints.gridwidth = GridBagConstraints.RELATIVE;
gbConstraints.fill = GridBagConstraints.NONE;
JLabel newNamePrompt = new JLabel(RefactoringBundle.message("migration.entry.new.name"));
panel.add(newNamePrompt, gbConstraints);
gbConstraints.gridwidth = GridBagConstraints.REMAINDER;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.weightx = 1;
myNewNameField = new LanguageTextField(JavaLanguage.INSTANCE, myProject, "", documentCreator);
panel.setPreferredSize(new Dimension(300, panel.getPreferredSize().height));
panel.add(myNewNameField, gbConstraints);
final DocumentListener documentAdapter = new DocumentListener()
{
@Override
public void documentChanged(DocumentEvent e)
{
validateOKButton();
}
};
myOldNameField.getDocument().addDocumentListener(documentAdapter);
myNewNameField.getDocument().addDocumentListener(documentAdapter);
return panel;
}
开发者ID:consulo,项目名称:consulo-java,代码行数:77,代码来源:EditMigrationEntryDialog.java
注:本文中的com.intellij.ui.LanguageTextField类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论