本文整理汇总了Java中org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel类的典型用法代码示例。如果您正苦于以下问题:Java CustomRefactoringPanel类的具体用法?Java CustomRefactoringPanel怎么用?Java CustomRefactoringPanel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CustomRefactoringPanel类属于org.netbeans.modules.refactoring.spi.ui包,在下文中一共展示了CustomRefactoringPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
String pkgName = null;
if (targetFolder != null) {
ClassPath cp = ClassPath.getClassPath(targetFolder, ClassPath.SOURCE);
if (cp != null) {
pkgName = cp.getResourceName(targetFolder, '.', false);
}
}
panel = new MoveClassPanel (parent,
pkgName != null ? pkgName : getDOPackageName(javaObjects.iterator().next().getParent()),
getString("LBL_MoveClassesHeadline"),
getString("LBL_MoveWithoutReferences"),
targetFolder != null ? targetFolder : javaObjects.iterator().next(),
disable, getNodes()
);
}
return panel;
}
示例2: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
String pkgName = null;
if (targetFolder != null) {
ClassPath cp = ClassPath.getClassPath(targetFolder, ClassPath.SOURCE);
if (cp != null) {
pkgName = cp.getResourceName(targetFolder, '.', false);
}
}
panel = new MoveClassPanel(parent,
pkgName != null ? pkgName : getDOPackageName(javaObjects.iterator().next().getParent()),
getString("LBL_CopyClassesHeadline"),
getString("LBL_CopyWithoutRefactoring"),
targetFolder != null ? targetFolder : javaObjects.iterator().next(),
disable, getNodes());
}
return panel;
}
示例3: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
public CustomRefactoringPanel getPanel(final ChangeListener parent) {
return new CustomRefactoringPanel() {
private final ClassPathBasedHintWrapper cpBased;
{
cpBased = new ClassPathBasedHintWrapper();
}
public void initialize() {
cpBased.compute();
//TODO: the ordering a bit dubious here:
SwingUtilities.invokeLater(new Runnable() {
@Override public void run() {
panel.initialize();
}
});
}
public Component getComponent() {
if (panel == null) {
panel = new InspectAndRefactorPanel(context, parent, query, cpBased);
panel.setPreferredSize(new Dimension(panel.getFontMetrics(panel.getFont()).charWidth('A')*75, panel.getPreferredSize().height));//NOI18N
}
return panel;
}
};
}
示例4: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if(panel==null) {
String pkgName = null;
if (targetFolder != null) {
ClassPath cp = ClassPath.getClassPath(targetFolder, ClassPath.SOURCE);
if (cp != null) {
pkgName = cp.getResourceName(targetFolder, '.', false);
}
}
String headline = NbBundle.getMessage(MoveMappingFilesRefactoringUI.class, "DSC_MoveMappingFiles");
if(mappingFileObjects.length == 1 ) {
headline = NbBundle.getMessage(MoveMappingFilesRefactoringUI.class, "DSC_MoveOneMappingFile", mappingFileObjects[0].getName());
}
panel = new MovePanel(parent,
pkgName != null ? pkgName : getDOPackageName(((FileObject) mappingFileObjects[0]).getParent()),
headline );
}
return panel;
}
示例5: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
return new CustomRefactoringPanel() {
@Override
public void initialize() {
}
@Override
public Component getComponent() {
return new JPanel();
}
};
}
示例6: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
panel = WhereUsedPanel.create(name, element, kind, classes, parent);
}
return panel;
}
示例7: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if(panel == null) {
panel = new UseSuperTypePanel(refactoring, className);
}
return panel;
}
示例8: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
final String pkgName;
if (targetFolder != null) {
pkgName = getPackageName(targetFolder);
} else if (javaObject != null) {
pkgName = getPackageName(javaObject.getPrimaryFile().getParent());
} else {
pkgName = getPackageName(javaClass.getFileObject().getParent());
}
final FileObject target;
if (targetFolder != null) {
target = targetFolder;
} else if (javaObject != null) {
target = javaObject.getPrimaryFile();
} else {
target = javaClass.getFileObject();
}
panel = new MoveClassPanel(parent,
pkgName,
NbBundle.getMessage(MoveClassUI.class, "LBL_MoveClassNamed", sourceName),
NbBundle.getMessage(MoveClassUI.class, "LBL_MoveWithoutReferences"),
target);
panel.setCombosEnabled(!disable);
panel.setRefactoringBypassRequired(needsByPass);
}
return panel;
}
示例9: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
panel = new ChangeParametersPanel(method, parent, preConfiguration, cs);
}
return panel;
}
示例10: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
FileObject target = targetFolder != null ? targetFolder : resource.getParent();
panel = new MoveClassPanel(parent,
RefactoringUtils.getPackageName(target),
getName() + " - " + resource.getName(), // NOI18N
NbBundle.getMessage(CopyClassRefactoringUI.class, "LBL_CopyWithoutRefactoring"),
target, resource.getName(), false);
panel.setCombosEnabled(!(targetFolder != null));
panel.setRefactoringBypassRequired(needsByPass);
}
return panel;
}
示例11: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
panel = new InnerToOuterPanel(refactoring, parent, disableDeclareFields);
}
return panel;
}
示例12: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
Collection selectedObjects = refactoring.getRefactoringSource().lookup(Collection.class);
panel = new EncapsulateFieldPanel(refactoring.getSelectedObject(), (Collection<TreePathHandle>) selectedObjects, offset, parent);
}
return panel;
}
示例13: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
panel = new IntroduceLocalExtensionPanel(htmlHeader, icon, newName, startPackage, type, parent);
}
return panel;
}
示例14: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
if (panel == null) {
String suffix = "";
if(handle != null && handle.getKind() == Tree.Kind.LABELED_STATEMENT) {
suffix = getString("LBL_Label");
} else if (handle != null && handle.getElementHandle() !=null) {
ElementKind kind = handle.getElementHandle().getKind();
if (kind!=null && (kind.isClass() || kind.isInterface())) {
suffix = kind.isInterface() ? getString("LBL_Interface") : getString("LBL_Class");
} else if (kind == ElementKind.METHOD) {
suffix = getString("LBL_Method");
} else if (kind == ElementKind.FIELD) {
suffix = getString("LBL_Field");
} else if (kind == ElementKind.LOCAL_VARIABLE) {
suffix = getString("LBL_LocalVar");
} else if (kind == ElementKind.PACKAGE || (handle == null && fromListener)) {
suffix = pkgRename ? getString("LBL_Package") : getString("LBL_Folder");
} else if (kind == ElementKind.PARAMETER) {
suffix = getString("LBL_Parameter");
}
}
suffix = suffix + " " + this.oldName; // NOI18N
panel = new RenamePanel(handle, newName, parent, NbBundle.getMessage(RenamePanel.class, "LBL_Rename") + " " + suffix, !fromListener, fromListener && !byPassPakageRename);
}
return panel;
}
示例15: getPanel
import org.netbeans.modules.refactoring.spi.ui.CustomRefactoringPanel; //导入依赖的package包/类
@Override
public CustomRefactoringPanel getPanel(ChangeListener parent) {
//TODO:Do you want to just use Arrays.asList?
if(panel == null) {
panel = new SafeDeletePanel(refactoring, regulardelete, parent);
}
return panel;
}