8038732: [javadoc] NetBeans IDE target does not build doclets

Reviewed-by: jjg, jlahoda
This commit is contained in:
Kumar Srinivasan 2014-08-27 06:25:17 -07:00
parent be04e8778b
commit d81bd9fdcf
4 changed files with 32 additions and 68 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,11 +41,9 @@ import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import java.util.Properties;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
@ -56,6 +54,7 @@ import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@ -101,6 +100,7 @@ public class SelectToolTask extends Task {
/**
* Set the location of the private properties file used to keep the retain
* user preferences for this repository.
* @param propertyFile the private properties file
*/
public void setPropertyFile(File propertyFile) {
this.propertyFile = propertyFile;
@ -110,6 +110,7 @@ public class SelectToolTask extends Task {
* Set the name of the property which will be set to the name of the
* selected tool, if any. If no tool is selected, the property will
* remain unset.
* @param toolProperty the tool name property
*/
public void setToolProperty(String toolProperty) {
this.toolProperty = toolProperty;
@ -118,14 +119,16 @@ public class SelectToolTask extends Task {
/**
* Set the name of the property which will be set to the execution args of the
* selected tool, if any. The args default to an empty string.
* @param argsProperty the execution args property value
*/
public void setArgsProperty(String argsProperty) {
this.argsProperty = argsProperty;
}
/**
* Set the name of the property which will be set to the execution args of the
* selected tool, if any. The args default to an empty string.
* Set the name of the property which will be used to bootstrap the
* selected tool, if any. The property will remain unset.
* @param bootstrapProperty
*/
public void setBootstrapProperty(String bootstrapProperty) {
this.bootstrapProperty = bootstrapProperty;
@ -134,6 +137,7 @@ public class SelectToolTask extends Task {
/**
* Specify whether or not to pop up a dialog if the user has not specified
* a default value for a property.
* @param askIfUnset a boolean flag indicating to prompt the user or not
*/
public void setAskIfUnset(boolean askIfUnset) {
this.askIfUnset = askIfUnset;
@ -208,10 +212,11 @@ public class SelectToolTask extends Task {
body.add(toolLabel, lc);
EnumSet<ToolChoices> toolChoices = toolProperty == null ?
EnumSet.allOf(ToolChoices.class) : EnumSet.range(ToolChoices.JAVAC, ToolChoices.JAVAP);
toolChoice = new JComboBox(toolChoices.toArray());
toolChoice = new JComboBox<>(toolChoices.toArray());
if (toolName != null)
toolChoice.setSelectedItem(ToolChoices.valueOf(toolName.toUpperCase()));
toolChoice.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
String tn = ((ToolChoices)e.getItem()).toolName;
argsField.setText(getDefaultArgsForTool(props, tn));
@ -237,8 +242,10 @@ public class SelectToolTask extends Task {
body.add(argsLabel, lc);
body.add(argsField, fc);
argsField.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
}
@Override
public void focusLost(FocusEvent e) {
String toolName = ((ToolChoices)toolChoice.getSelectedItem()).toolName;
if (toolName.length() > 0)
@ -257,6 +264,7 @@ public class SelectToolTask extends Task {
okButton = new JButton("OK");
okButton.setEnabled(toolProperty == null || (toolName != null && !toolName.equals("")));
okButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JDialog d = (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, p);
d.setVisible(false);
@ -326,7 +334,7 @@ public class SelectToolTask extends Task {
private File propertyFile;
// GUI components
private JComboBox toolChoice;
private JComboBox<?> toolChoice;
private JCheckBox bootstrapCheckbox;
private JTextField argsField;
private JCheckBox defaultCheck;