[RSS]

Visual Web User Settings Migration

Background

NB 6.0 is the migration path for Creator 2 update 1 users. Creator 2u1 was based NB 4.1. Most of these generic NB 4.1 settings in Creator are no longer applicable to the new NB 6.0 UI environment. Therefore, the only settings, which are critical to be migrated over, are for Creator 2u1 projects import in NB 6.0. They are:
  • user-defined libraries
  • component library
  • datasources
(See issue 99740)

Up to date, the component library has already been implemented to resolve the complib references automatically when being opened in NB 6.0. In addition, NB project system already has a mechanism in place to resolve user-defined libraries. Although this mechanism requires some user intervention, it works well for resolving user-defined libraries. There are a number of risk factors associated with merging the user-defined libraries automatically, such as, the library can have the same name but slightly different binaries, different file/directory layouts and there is no versioning inside these libraries. It would also be inconsistent with how NB project currently resolves user-defined library references. Hence, the remaining open issue mainly is to resolve datasource references for Creator projects after the initial start of the IDE.

Use Cases

At the first cold start of the IDE, the NB 6.0 upgrade module will detect if any of the following user directories exists:
  • Creator 2 Update 1
  • NB 5.0
  • NB 5.5
  • NB 5.5.1

A. Only 1 user dir from the list above exists

The user will be prompted the same Import User Settings dialog as it currently comes up at the first cold start of the IDE now.

B. Multiple user directories exist

When there are multiple user directories of NB 5.x are detected on the system, the user can only migrate the latest version. The order is as follows:
  1. NB 5.5.1
  2. NB 5.5
  3. Creator 2u1 (this will get migrated only if the visualweb1 cluster exists in the install directory)

C. Creator 2u1 selected for migration

All of the critical Creator 2u1 settings as mentioned in the background section above will be migrated. The IDE main window layout, other IDE preferences will be the same as the NB 6.0 default settings since there won't be any generic NB 4.1 settings migrated from Creator user directory.

D. NB 5.x selected for migration

This is similar to the use case(s) where the Creator 2u1 settings have not been migrated during the initial startup of the IDE. The implementation task for this is 104005. The following logic will take place in the Listener of when a VW project is opened:
if (project version is older than "4.0" which means pre-NB6.0) {
   - If haven't already, import the context.xml and jdbc-drivers/* from the old user directories
   - Process the migrated settings
   - Register the new datasources in the IDE
   - model the project to obtain datasources (display a progress bar in the status line)
   - resolve broken references
   - Change the project version to "4.0"
   if (still has broken references) {
   - The project node & datasource node will be badged the next time the project is opened.
   - Resolving Broken datasources process will kick in. For more details on how to resolve broken datasource references, review this [ Resolve Broken Datasource spec | http://wiki.netbeans.org/wiki/view/ResolveBrokenDataSourcesSpec].
   }

}

For more details on the imported file layout, review Importable user settings from Creator 2-based product table .

Implementation tasks

  1. Detection of Creator 2u1 user directory in addition to NB 5.x user dir. (99748)
  2. Display the Import User Settings message if only 1 valid user dir is found on the system. (99748)
  3. Copying the file layout from the selected old user directory to the new NB 6.0 user dir. More details on the file layouts/directory structures are described in the tables at http://netbeans.czech/wiki/view/Netbeans/PromotionHSettingsMigration. (99748)
  4. Since the task#3 above is done during User Settings Import and depending on the user's choices, it might not migrate the specific Creator User Settings that are needed for Creator project import later on. Hence, a similar copy task as #3 is needed for migrating only specific Creator user settings. (99740)
  5. Posting a dialog with instructions to resolve the datasource and badging the Data Source References node. 103082 is an enhancement to the migration task (98286)
  6. Implement information dialog if the migrated user settings are not sufficient for the project
  7. Filter Pointbase jar and connection to keep from being registered (for Creator 2)

Attachments

Picture 20.png Info on Picture 20.png 18990 bytes
Picture 29.png Info on Picture 29.png 18969 bytes