This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
}
String id = info.preferredID().replace('.', '-');
String role = reg.role();
String[] roles = reg.roles();
String rootFolder = role.isEmpty() ? "Windows2" : "Windows2/Roles/" + role;
for (String role : roles){
File settingsFile = layer(e).
file(rootFolder+"/Components/" + id + ".settings").
contents(settingsFile(e));
settingsFile.write();
File modeFile = layer(e).
file(rootFolder+"/Modes/" + reg.mode() + "/" + id + ".wstcref").
position(reg.position()).
contents(modeFile(info.preferredID(), reg.openAtStartup()));
modeFile.write();
for (Element e : roundEnv.getElementsAnnotatedWith(TopComponent.OpenActionRegistration.class)) {
/** Shall the component be opened at start */
boolean openAtStartup();
/**
* Window layout role or an empty string for the default layout
* Window layout roles or an empty string for the default layout
* @see WindowManager#setRole(java.lang.String)
* @since 6.45
*/
String role() default "";
String[] roles() default {};
/** Creates an action that can open the component.
public void testTCRegisteredInRoleFine() throws Exception {
FileObject set = FileUtil.getConfigFile("Windows2/Roles/UnitTestRole/Components/my-tc2.settings");
FileObject set = FileUtil.getConfigFile("Windows2/Roles/UnitTestRole1/Components/my-tc2.settings");
assertNotNull("Settings file found", set);
assertValidate(set.asText());
@TopComponent.Registration(
mode="output",
openAtStartup=false,
role="UnitTestRole"
roles={"UnitTestRole1", "UnitTestRole2"}
)
@TopComponent.Description(
preferredID="my-tc2", iconBase="org/openide/windows/Icon.png"