org.openide.util.NbBundle源码实例Demo

java.awt.event.HierarchyBoundsListener#org.openide.util.NbBundle源码实例Demo

下面列出了java.awt.event.HierarchyBoundsListener#org.openide.util.NbBundle 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: ClassesListControllerUI.java
public void hideDiffProgress() {
    SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            w.setVisible(false);
            p.setVisible(false);
            p.setIndeterminate(false);
            
            if (classesListController.isDiff()) {
                l.setText("<html><nobr>" + NbBundle.getMessage(ClassesListControllerUI.class, // NOI18N
                          "ClassesListControllerUI_ShowingDiffText", "<a href='#'>", "</a>") + "</nobr></html>"); // NOI18N
            } else {
                l.setText("<html><nobr><a href='#'>" + Bundle.ClassesListControllerUI_CompareWithAnotherText() + "</a></nobr></html>"); // NOI18N
            }
            l.setVisible(true);
        }
    });
}
 
源代码2 项目: netbeans   文件: TagManager.java
@Override
public Component getListCellRendererComponent (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
    if (value instanceof HgTag) {
        HgTag tag = (HgTag) value;
        StringBuilder sb = new StringBuilder().append(tag.getName());
        HgLogMessage.HgRevision parent = parentRevision;
        if (parent != null && parent.getRevisionNumber().equals(tag.getRevisionInfo().getRevisionNumber())) {
            sb.append(MARK_ACTIVE_HEAD);
        }
        if (tag.isLocal()) {
            sb.append(" - ").append(NbBundle.getMessage(TagManager.class, "LBL_TagManager.tag.local")); //NOI18N
        }
        value = sb.toString();
    }
    return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
}
 
源代码3 项目: netbeans   文件: ImplementOverridePanel.java
/** Creates new form ConstructorPanel */
   public ImplementOverridePanel(ElementNode.Description description, boolean isImplement) {
       initComponents();
       elementSelector = new ElementSelectorPanel(description, false, true);
       elementSelector.getExplorerManager().addPropertyChangeListener(new PropertyChangeListener() {
           @Override
           public void propertyChange(PropertyChangeEvent evt) {
               firePropertyChange(evt.getPropertyName(), evt.getOldValue(), evt.getNewValue());
           }
       });
       java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
       gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
       gridBagConstraints.weightx = 1.0;
       gridBagConstraints.weighty = 1.0;
       gridBagConstraints.insets = new java.awt.Insets(0, 12, 0, 12);
       add(elementSelector, gridBagConstraints);
       selectorLabel.setText(NbBundle.getMessage(ImplementOverrideMethodGenerator.class, isImplement ? "LBL_implement_method_select" : "LBL_override_method_select")); //NOI18N
       selectorLabel.setLabelFor(elementSelector);
       
       elementSelector.doInitialExpansion(isImplement ? -1 : 1);

this.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(ImplementOverrideMethodGenerator.class, "A11Y_Generate_ImplementOverride"));
   }
 
源代码4 项目: netbeans   文件: EarDataNode.java
protected Sheet createSheet () {
    Sheet s = new Sheet ();
    Sheet.Set ss = new Sheet.Set ();
    ss.setName (DEPLOYMENT);
    ss.setDisplayName (NbBundle.getMessage (EarDataNode.class, "PROP_deploymentSet"));
    ss.setShortDescription (NbBundle.getMessage (EarDataNode.class, "HINT_deploymentSet"));  
    ss.setValue ("helpID", "TBD---Ludo ejbjar node");   // NOI18N
    
    Node.Property p = new PropertySupport.ReadOnly (
        PROPERTY_DOCUMENT_TYPE,
        String.class,
        NbBundle.getBundle(EarDataNode.class).getString("PROP_documentDTD"),
        NbBundle.getBundle(EarDataNode.class).getString("HINT_documentDTD")
    ) {
        public Object getValue () {
            return dataObject.getApplication().getVersion();
        }
    };
    ss.put (p);
    s.put (ss);
    
    return s;
}
 
源代码5 项目: netbeans   文件: ValidateSupport.java
/** Asserts that an attribute has a boolean value.
 * @param   value       Value of attribute.
 * @param   name        Name of attribute.
 * @param   source      Source element.
 * @param   category    Category of failure.
 * @return  <code>true</code> if more validations can be made; <code>false</code> otherwise.
 */
public boolean assertBooleanAttrib(String value, String name, Component source, int category) {
    if ((source instanceof WSDLComponent)
                && !mValConfig.getBooleanProperty(ValidateConfiguration.WSDL_SYNTAX_ATTRIB_BOOLEAN)) {
        return true;
    }
    
    if (!isAttributeAbsent(value) && !(value.equals("yes") || value.equals("no"))) {
        return fireToDo(Validator.ResultType.ERROR,
            source,
            NbBundle.getMessage(ValidateSupport.class, VAL_NOT_BOOLEAN_ATTRIB, name),
            NbBundle.getMessage(ValidateSupport.class, FIX_NOT_BOOLEAN_ATTRIB, name)
        );
    }
    return true;
}
 
源代码6 项目: netbeans   文件: BranchSelector.java
public BranchSelector (File repository) {
    this.repository = repository;
    panel = new BranchSelectorPanel();
    panel.branchList.setCellRenderer(new RevisionRenderer());
    
    filterTimer = new Timer(300, new ActionListener() {
        @Override
        public void actionPerformed (ActionEvent e) {
            filterTimer.stop();
            applyFilter();
        }
    });
    panel.txtFilter.getDocument().addDocumentListener(this);
    panel.branchList.addListSelectionListener(this);
    panel.jPanel1.setVisible(false);
    cancelButton = new JButton();
    org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(BranchSelector.class, "CTL_BranchSelector_Action_Cancel")); // NOI18N
    cancelButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BranchSelector.class, "ACSD_BranchSelector_Action_Cancel")); // NOI18N
    cancelButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(BranchSelector.class, "ACSN_BranchSelector_Action_Cancel")); // NOI18N
}
 
源代码7 项目: netbeans   文件: FxModelBuilder.java
@NbBundle.Messages({
    "#0 - attribute name",
    "ERR_unexpectedScriptAttribute=Unexpected attribute in fx:script: {0}"
})
private FxNode handleFxScript(Attributes atts) {
    String ref = null;
    
    for (int i = 0; i < atts.getLength(); i++) {
        String name = atts.getLocalName(i);
         if (!FX_ATTR_REFERENCE_SOURCE.equals(name)) {
            addAttributeError(atts.getQName(i),
                "invalid-script-attribute",
                ERR_unexpectedScriptAttribute(name),
                name
            );
            continue;
        }
        ref = atts.getValue(i);
    }
    return accessor.createScript(ref);
}
 
源代码8 项目: netbeans   文件: DefaultDataObject.java
/** Either opens the in text editor or asks user questions.
 */
public void open() {
    EditorCookie ic = getCookie(EditorCookie.class);
    if (ic != null) {
        ic.open();
    } else {
        // ask a query 
        List<Object> options = new ArrayList<Object>();
        options.add (NotifyDescriptor.OK_OPTION);
        options.add (NotifyDescriptor.CANCEL_OPTION);
        NotifyDescriptor nd = new NotifyDescriptor (
            NbBundle.getMessage (DefaultDataObject.class, "MSG_BinaryFileQuestion"),
            NbBundle.getMessage (DefaultDataObject.class, "MSG_BinaryFileWarning"),
            NotifyDescriptor.DEFAULT_OPTION,
            NotifyDescriptor.QUESTION_MESSAGE,
            options.toArray(), null
        );
        Object ret = DialogDisplayer.getDefault().notify (nd);
        if (ret != NotifyDescriptor.OK_OPTION) {
            return;
        }
        
        EditorCookie c = getCookie(EditorCookie.class, true);
        c.open ();
    }
}
 
源代码9 项目: netbeans   文件: LocalServerController.java
/**
 * Validate given local server instance, its source root.
 * @param localServer local server to validate.
 * @param type the type for error messages.
 * @param allowNonEmpty <code>true</code> if the folder can exist and can be non empty.
 * @param allowInRoot  <code>true</code> if the folder can exist and can be a root directory "/" (on *NIX only).
 * @return error message or <code>null</code> if source root is ok.
 * @see Utils#validateProjectDirectory(java.lang.String, java.lang.String, boolean)
 */
public static String validateLocalServer(final LocalServer localServer, String type, boolean allowNonEmpty,
        boolean allowInRoot) {
    if (!localServer.isEditable()) {
        return null;
    }
    String err = null;
    String sourcesLocation = localServer.getSrcRoot();
    File sources = FileUtil.normalizeFile(new File(sourcesLocation));
    if (sourcesLocation.trim().length() == 0
            || !Utils.isValidFileName(sources)) {
        err = NbBundle.getMessage(LocalServerController.class, "MSG_Illegal" + type + "Name");
    } else {
        err = Utils.validateProjectDirectory(sourcesLocation, type, allowNonEmpty, allowInRoot);
    }
    return err;
}
 
源代码10 项目: netbeans   文件: OperationWidget.java
public TabImageWidget(Scene scene, int size) {
    super(scene, Color.LIGHT_GRAY, size, size);
    setBorder(BorderFactory.createLineBorder(0, Color.LIGHT_GRAY));
    setBackground(Color.WHITE);
    setOpaque(true);
    setToolTipText(NbBundle.getMessage(OperationWidget.class, "Hint_TabbedView"));
}
 
源代码11 项目: visualvm   文件: ProfilerSupport.java
public String getProfiledApplicationName() {
    String name = NbBundle.getMessage(ProfilerSupport.class, "STR_Externaly_started_app"); // NOI18N
    Application a = getProfiledApplication();
    if (a == null) {
        int state = NetBeansProfiler.getDefaultNB().getProfilingState();
        return state == NetBeansProfiler.PROFILING_INACTIVE ? null : name;
    }
    DataSourceDescriptor d = DataSourceDescriptorFactory.getDescriptor(a);
    return d != null ? d.getName() : name;
}
 
源代码12 项目: netbeans   文件: TracerView.java
@NbBundle.Messages({
    "LBL_ProfileClass=Profile Class",
    "LBL_ProfileMethod=Profile Method"                
})
protected void selectForProfiling(final ClientUtils.SourceCodeSelection value) {
    RequestProcessor.getDefault().post(new Runnable() {
        public void run() {
            String name = Wildcards.ALLWILDCARD.equals(value.getMethodName()) ?
                          Bundle.LBL_ProfileClass() : Bundle.LBL_ProfileMethod();
            ProfilerSession.findAndConfigure(Lookups.fixed(value), null, name);
        }
    });
}
 
源代码13 项目: netbeans   文件: AbstractQuickSearchComboBar.java
/**
 * Warn that search text would be invalid.
 */
@NbBundle.Messages({
    "MSG_INVALID_SEARCH_TEST=Search text is too long."
})
private void warnAboutInvalidText() {
    NotifyDescriptor nd = new NotifyDescriptor.Message(
            Bundle.MSG_INVALID_SEARCH_TEST(),
            NotifyDescriptor.ERROR_MESSAGE);
    DialogDisplayer.getDefault().notifyLater(nd);
}
 
源代码14 项目: netbeans   文件: PUDataObject.java
/**
 * Checks whether the preferred view can be displayed and switches to the
 * xml view and displays an appropriate warning if not. In case that
 * the preferred view is the design view, it
 * can be displayed if <ol><li>document is valid (parseable) and</li>
 *<li>the target server is attached></li></ol>.
 *@return true if the preferred view can be displayed, false otherwise.
 */
public boolean viewCanBeDisplayed() {
    
    boolean switchView = false;
    NotifyDescriptor nd = null;
    if(FileOwnerQuery.getOwner(getPrimaryFile())==null) {
         nd = new org.openide.NotifyDescriptor.Message(
                NbBundle.getMessage(PUDataObject.class, "TXT_StandAlonePersistence",
                getPrimaryFile().getNameExt()), NotifyDescriptor.WARNING_MESSAGE);
        switchView = true;           
    } else if (!parseDocument() && getSelectedPerspective().preferredID().startsWith(DESIGN_VIEW_ID)) {
        nd = new org.openide.NotifyDescriptor.Message(
                NbBundle.getMessage(PUDataObject.class, "TXT_DocumentUnparsable",
                getPrimaryFile().getNameExt()), NotifyDescriptor.WARNING_MESSAGE);
        switchView = true;
        
    } else if (!ProviderUtil.isValidServerInstanceOrNone(FileOwnerQuery.getOwner(getPrimaryFile()))
    && getSelectedPerspective().preferredID().startsWith(DESIGN_VIEW_ID)){
        
        nd = new org.openide.NotifyDescriptor.Message(
                NbBundle.getMessage(PUDataObject.class, "TXT_ServerMissing"),
                NotifyDescriptor.WARNING_MESSAGE);
        switchView = true;
    }
    
    if (switchView){
        DialogDisplayer.getDefault().notify(nd);
        // postpone the "Switch to XML View" action to the end of event dispatching thread
        // this enables to finish the current action first (e.g. painting particular view)
        // see the issue 67580
        SwingUtilities.invokeLater(new Runnable(){
            @Override
            public void run() {
                goToXmlView();
            }
        });
    }
    return !switchView;

}
 
源代码15 项目: netbeans   文件: DiffAction.java
public void diff (VCSContext context, Revision left, Revision right) {
    String contextName = Utils.getContextDisplayName(context);
    MultiDiffPanelController controller = new MultiDiffPanelController(context, left, right);
    DiffTopComponent tc = new DiffTopComponent(controller);
    controller.setActions(tc);
    tc.setName(NbBundle.getMessage(DiffAction.class, "CTL_DiffPanel_Title", contextName)); //NOI18N
    tc.open();
    tc.requestActive();
}
 
源代码16 项目: netbeans   文件: SystemDefaultBrowser.java
/**
 * Returns a new instance of BrowserImpl implementation.
 * @throws UnsupportedOperationException when method is called and OS is not Windows.
 * @return browserImpl implementation of browser.
 */
@Override
public HtmlBrowser.Impl createHtmlBrowserImpl() {
    if (ACTIVE) {
        return new Jdk6BrowserImpl();
    } else if (Utilities.isWindows()) {
        return new NbDdeBrowserImpl(this);
    } else if (Utilities.isMac()) {
        return new MacBrowserImpl(this);
    } else if (Utilities.isUnix() && !Utilities.isMac()) {
        return new NbDefaultUnixBrowserImpl(this);
    } else {
        throw new UnsupportedOperationException(NbBundle.getMessage(SystemDefaultBrowser.class, "MSG_CannotUseBrowser"));
    }
}
 
源代码17 项目: netbeans   文件: ComputeOverriders.java
private List<URL> reverseSourceRootsInOrder(CompilationInfo info, URL thisSourceRoot, FileObject thisSourceRootFO, Map<URL, List<URL>> sourceDeps, Map<URL, List<URL>> binaryDeps, Map<URL, List<URL>> rootPeers, boolean interactive) {
    if (reverseSourceRootsInOrderOverride != null) {
        return reverseSourceRootsInOrderOverride;
    }

    final Set<URL> sourceRootsSet = new HashSet<>();

    if (sourceDeps.containsKey(thisSourceRoot)) {
        sourceRootsSet.addAll(findReverseSourceRoots(thisSourceRoot, sourceDeps, rootPeers, info.getFileObject()));
    }
    for (URL binary : findBinaryRootsForSourceRoot(thisSourceRootFO, binaryDeps)) {
        final List<URL> deps = binaryDeps.get(binary);
        if (deps != null) {
            sourceRootsSet.addAll(deps);
        }
    }
    List<URL> sourceRoots;
    try {
        sourceRoots = new LinkedList<URL>(Utilities.topologicalSort(sourceDeps.keySet(), sourceDeps));
    } catch (TopologicalSortException ex) {
        if (interactive) {
            Exceptions.attachLocalizedMessage(ex,NbBundle.getMessage(GoToImplementation.class, "ERR_CycleInDependencies"));
            Exceptions.printStackTrace(ex);
        } else {
            LOG.log(Level.FINE, null, ex);
        }
        return null;
    }

    sourceRoots.retainAll(sourceRootsSet);

    Collections.reverse(sourceRoots);

    return sourceRoots;
}
 
源代码18 项目: netbeans   文件: XMLMIMEComponent.java
protected XMLReader createXMLReader() {
    XMLReader parser = null;
    
    try {
        parser = XMLUtil.createXMLReader(false, true);           
        try {
            parser.setProperty("http://xml.org/sax/properties/lexical-handler", this);  //NOI18N
        } catch (SAXException sex) {
            Logger.getLogger(XMLMIMEComponent.class.getName()).fine(NbBundle.getMessage(XMLMIMEComponent.class, "W-003"));  //NOI18N
        }
    } catch (SAXException ex) {
        Logger.getLogger(XMLMIMEComponent.class.getName()).log(Level.WARNING, null, ex);
    }
    return parser;
}
 
源代码19 项目: netbeans   文件: FileUtils.java
/**
 * Validate a file path and return {@code null} if it is valid, otherwise an error.
 * <p>
 * A valid file means that the <tt>filePath</tt> represents a valid, readable file
 * with absolute file path.
 * @param source source used in error message (e.g. "Script", "Config file")
 * @param filePath a file path to validate
 * @param writable {@code true} if the file must be writable, {@code false} otherwise
 * @return {@code null} if it is valid, otherwise an error
 */
@NbBundle.Messages({
    "# {0} - source",
    "FileUtils.validateFile.missing={0} must be selected.",
    "# {0} - source",
    "FileUtils.validateFile.notAbsolute={0} must be an absolute path.",
    "# {0} - source",
    "FileUtils.validateFile.notFile={0} must be a valid file.",
    "# {0} - source",
    "FileUtils.validateFile.notReadable={0} is not readable.",
    "# {0} - source",
    "FileUtils.validateFile.notWritable={0} is not writable."
})
@CheckForNull
public static String validateFile(String source, String filePath, boolean writable) {
    if (!StringUtils.hasText(filePath)) {
        return Bundle.FileUtils_validateFile_missing(source);
    }

    File file = new File(filePath);
    if (!file.isAbsolute()) {
        return Bundle.FileUtils_validateFile_notAbsolute(source);
    } else if (!file.isFile()) {
        return Bundle.FileUtils_validateFile_notFile(source);
    } else if (!file.canRead()) {
        return Bundle.FileUtils_validateFile_notReadable(source);
    } else if (writable && !file.canWrite()) {
        return Bundle.FileUtils_validateFile_notWritable(source);
    }
    return null;
}
 
源代码20 项目: netbeans   文件: MenuWarmUpTask.java
@Override
public boolean cancel() {
    synchronized(rp) {
        if (task != null) {
            task.cancel();
        }
        if (goOn != null) {
            goOn.set(false);
            LOG.log(Level.FINE, "Signaling cancel to {0}", System.identityHashCode(goOn));
        } else {
            LOG.log(Level.FINE, "Cannot signal cancel, goOn is null");
        }
    }

    ++counter;

    if (UILOG.isLoggable(Level.FINE)) {
        LogRecord r = new LogRecord(Level.FINE, "LOG_WINDOW_REFRESH_CANCEL"); // NOI18N
        r.setParameters(new Object[]{counter});
        r.setResourceBundleName("org.netbeans.core.ui.warmup.Bundle"); // NOI18N
        r.setResourceBundle(NbBundle.getBundle(MenuWarmUpTask.class)); // NOI18N
        r.setLoggerName(UILOG.getName());
        UILOG.log(r);
    }

    return true;
}
 
源代码21 项目: netbeans   文件: DBTableDrop.java
/**
 * Registers assistant messages related to DB table DnD.
 */
private void initAssistant() {
    ResourceBundle bundle = NbBundle.getBundle(DBColumnDrop.class);
    String dropBindingMsg = bundle.getString("MSG_TableDropBinding"); // NOI18N
    String dropComponentMsg = bundle.getString("MSG_TableDropComponent"); // NOI18N
    String tableWithoutPKMsg = bundle.getString("MSG_TableWithoutPK"); // NOI18N
    String tableDefaultPackageMsg = bundle.getString("MSG_TableDefaultPackage"); // NOI18N
    AssistantMessages messages = AssistantMessages.getDefault();
    messages.setMessages("tableDropBinding", dropBindingMsg); // NOI18N
    messages.setMessages("tableDropComponent", dropComponentMsg); // NOI18N
    messages.setMessages("tableWithoutPK", tableWithoutPKMsg); // NOI18N
    messages.setMessages("tableDefaultPackage", tableDefaultPackageMsg);
    assistantInitialized = true;
}
 
源代码22 项目: netbeans   文件: WsdlSaas.java
@Override
protected void refresh() {
    if (getState() == State.INITIALIZING) {
        throw new IllegalStateException(NbBundle.getMessage(WsdlSaas.class, "MSG_CantRefreshWhileInitializing"));
    }
    super.refresh();
    ports = null;
    
    if (wsData == null) {
        wsData = WsdlUtil.findWsdlData(this.getUrl(), null);
        
        if (wsData == null) {
            // If the wsData has never been retrieved and compiled, we simply call
            // toStateReady and return.
            toStateReady(false);
            return;
        } else {
            // If the wsData has been retrieved and compiled but has not
            // yet been initialized, we initialize it now (which is quick)
            // and then refresh it.
            wsData = null;
            toStateReady(true);
        }
    }
    
    WsdlUtil.refreshWsdlData(wsData);
}
 
源代码23 项目: netbeans   文件: FlashingIcon.java
private String getToolTip(int unread, NotificationImpl n) {
    if (unread < 1) {
        return null;
    }
    String tooltip = "<b>" + NbBundle.getMessage(FlashingIcon.class, unread == 1 ? "LBL_UnreadNotification" : "LBL_UnreadNotifications", unread) + "</b>";
    if (n != null) {
        tooltip += "<br>" + NbBundle.getMessage(FlashingIcon.class,"LBL_LastNotification") + " " + n.getTitle();
    }
    tooltip = "<html>" + tooltip + "</html>";

    return tooltip;
}
 
源代码24 项目: jeddict   文件: JPQLEditorPanel.java
private void initCustomComponents() {
    initComponents();
    save_Button = new javax.swing.JButton();
    save_Button.setIcon(new ImageIcon(SaveAction.class.getClassLoader().getResource("org/openide/resources/actions/save.png"))); // NOI18N
    org.openide.awt.Mnemonics.setLocalizedText(save_Button, org.openide.util.NbBundle.getMessage(JPQLEditorPanel.class, "JPQLEditorPanel.save_Button.text")); // NOI18N
    save_Button.addActionListener(this::save_ButtonActionPerformed);

    toolBar.add(save_Button, 0);
    toolBar.add(new JToolBar.Separator(new Dimension(200, 10)),1);
    
    setFocusToEditor();
    requestProcessor = new RequestProcessor("jpql-parser", 1, true);
}
 
源代码25 项目: netbeans   文件: TracerView.java
@NbBundle.Messages("LBL_SelectingIntervals=Selecting method intervals...")
@Override
public void actionPerformed(ActionEvent actionEvent) {
    RequestProcessor.getDefault().post(new Runnable() {
        public void run() {
            ProgressHandle pHandle = null;
            try {
                pHandle = ProgressHandle.createHandle(Bundle.LBL_SelectingIntervals());
                pHandle.setInitialDelay(0);
                pHandle.start();
                
                List<Integer> ints = model.getIntervals(node);
                assert ints.size() % 2 == 0;
                final Iterator<Integer> iter = ints.iterator();
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        TimelineSupport support = model.getTimelineSupport();
                        support.resetSelectedIntervals();
                        while (iter.hasNext()) {
                            int start = iter.next();
                            int stop  = iter.next();
                            support.selectInterval(start, stop);
                        }
                        support.selectedIntervalsChanged();
                    }
                });
            } catch (IOException ex) {
                Exceptions.printStackTrace(ex);
            } finally {
                if (pHandle != null) pHandle.finish();
            }
        }
    });
}
 
源代码26 项目: netbeans   文件: PropertiesEditorSupport.java
/** 
 * Overrides superclass abstract method.
 * Is modified and is being closed.
 * @return text to show to the user
 */
protected String messageSave () {
    return NbBundle.getMessage (
        PropertiesEditorSupport.class,
        "MSG_SaveFile", // NOI18N
        getFileLabel()
    );
}
 
源代码27 项目: netbeans   文件: MetaDataCustomizer.java
@Override
public String getColumnName(int column) {
    if (column == KEY_COLUMN) {
        return org.openide.util.NbBundle.getMessage(MetaDataCustomizer.class, "LBL_NAME_COLUMN");
    } else if (column == VALUE_COLUMN) {
        return org.openide.util.NbBundle.getMessage(MetaDataCustomizer.class, "LBL_VALUE_COLUMN");
    }
    return "";
}
 
源代码28 项目: netbeans   文件: SimpleTestCaseWizardIterator.java
private void loadSettings(WizardDescriptor wizard) {
    JUnitSettings settings = JUnitSettings.getDefault();
    
    wizard.putProperty(GuiUtils.CHK_PUBLIC, settings.isMembersPublic());
    wizard.putProperty(GuiUtils.CHK_PROTECTED, settings.isMembersProtected());
    wizard.putProperty(GuiUtils.CHK_PACKAGE, settings.isMembersPackage());
    wizard.putProperty(GuiUtils.CHK_SETUP, settings.isGenerateSetUp());
    wizard.putProperty(GuiUtils.CHK_TEARDOWN, settings.isGenerateTearDown());
    wizard.putProperty(GuiUtils.CHK_BEFORE_CLASS, settings.isGenerateClassSetUp());
    wizard.putProperty(GuiUtils.CHK_AFTER_CLASS, settings.isGenerateClassTearDown());
    wizard.putProperty(GuiUtils.CHK_METHOD_BODIES, settings.isBodyContent());
    wizard.putProperty(GuiUtils.CHK_JAVADOC, settings.isJavaDoc());
    wizard.putProperty(GuiUtils.CHK_HINTS, settings.isBodyComments());
    wizard.putProperty("NewFileWizard_Title", NbBundle.getMessage(SimpleTestStepLocation.class, "LBL_simpleTestWizard_stepName"));
}
 
源代码29 项目: netbeans   文件: CustomizerRun.java
private boolean createNewConfiguration(boolean platformChanged) {
    DialogDescriptor d = new DialogDescriptor(new CreateConfigurationPanel(platformChanged), NbBundle.getMessage(CustomizerRun.class, "CustomizerRun.input.title"));        
    
    if (DialogDisplayer.getDefault().notify(d) != NotifyDescriptor.OK_OPTION) {
        return false;
    }
    String name = ((CreateConfigurationPanel) d.getMessage()).getConfigName();
    String config = name.replaceAll("[^a-zA-Z0-9_.-]", "_"); // NOI18N
    if (config.trim().length() == 0) {
        //#143764
        DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(
                NbBundle.getMessage(CustomizerRun.class, "CustomizerRun.input.empty", config), // NOI18N
                NotifyDescriptor.WARNING_MESSAGE));
        return false;

    }
    if (configs.get(config) != null) {
        DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(
                NbBundle.getMessage(CustomizerRun.class, "CustomizerRun.input.duplicate", config), // NOI18N
                NotifyDescriptor.WARNING_MESSAGE));
        return false;
    }
    Map<String,String> m = new HashMap<String,String>();
    if (!name.equals(config)) {
        m.put("$label", name); // NOI18N
    }
    configs.put(config, m);
    configChanged(config);
    uiProperties.activeConfig = config;
    return true;
}
 
源代码30 项目: netbeans   文件: SymfonyOptionsValidator.java
@NbBundle.Messages("SymfonyOptionsValidator.installer=Installer")
public SymfonyOptionsValidator validateInstaller(String installer) {
    String warning = PhpExecutableValidator.validateCommand(installer, Bundle.SymfonyOptionsValidator_installer());
    if (warning != null) {
        result.addWarning(new ValidationResult.Message(SymfonyOptions.INSTALLER, warning));
    }
    return this;
}