Difference between revisions of "OpenOffice and Eclipse"
m (Include solver/.../inc/offuh to list of include paths.) |
(Added a section about how to use Mylyn to access Bugzilla) |
||
Line 10: | Line 10: | ||
* Module by module. | * Module by module. | ||
:This approach works with vanilla Eclipse. You only import individual modules (say sw/ and sfx/ into your workspace). | :This approach works with vanilla Eclipse. You only import individual modules (say sw/ and sfx/ into your workspace). | ||
+ | :This approach is described below. | ||
==Module by Module== | ==Module by Module== | ||
Line 49: | Line 50: | ||
*Click OK to close the dialog. | *Click OK to close the dialog. | ||
*Rebuild the index via 'Project->C/C++ Index->Rebuild'. This time the indexer should runs longer because it has to index no only the files in the module but also all include files in <code>solver/</code> | *Rebuild the index via 'Project->C/C++ Index->Rebuild'. This time the indexer should runs longer because it has to index no only the files in the module but also all include files in <code>solver/</code> | ||
+ | |||
+ | ===Using Mylyn for integrating Bugzilla=== | ||
+ | Eclipse has a very powerful plugin for integrating bug trackers into the IDE. Bugzilla is supported out of the box. Support for eg. Jira exists also. | ||
+ | Setup for OpenOffice Bugzilla: | ||
+ | * Open the 'Task List' via 'Window->Show View->Task List'. Note that this is not the same view as 'Tasks'. | ||
+ | * If you do this for the first time you will see a 'Connect' link at the bottom of the new view. Click it. | ||
+ | * Otherwise open the 'Task Repositories' view via 'Window->Show View->Other...' | ||
+ | ** In the 'Show View' dialog select 'Mylyn->Task Repositories' | ||
+ | ** Click on the 'Add Task Repository...' button in the tool bar of the view. | ||
+ | |||
+ | In the 'Add Task Repository...' dialog: | ||
+ | * Choose 'Bugzilla (supports 3.6 and later)' | ||
+ | * Click 'Next >' | ||
+ | * Enter 'https://issues.apache.org/ooo/' ino the 'Server' field. | ||
+ | * Enter 'OpenOffice Bugzilla' or some other descriptive string into the 'Label' field. | ||
+ | * Fill out 'User ID' and 'Password' fields | ||
+ | * (Optional) Check the 'Save Password' | ||
+ | * Click 'Finish' and answer any popups as you like. | ||
+ | |||
+ | Search for tasks in Bugzilla in the 'Task List' view: | ||
+ | * Insert the task id in the search field. Click the now visible link 'Search repository for key or summary...'. | ||
+ | * In the 'Search' dialog: | ||
+ | ** Make sure that 'Repository' is set to 'OpenOffice Bugzilla' | ||
+ | ** The 'Task Key/ID' field should show the task id you entered earlier. | ||
+ | ** Click on 'Search' | ||
+ | * A new editor opens in the editor area with the details about the found bug. | ||
+ | * If you don't like this view, click on the 'Open with Web Browser' button in the toolbar of the editor. | ||
+ | * There seems to be a bug that prevents submitting changes. I get a 'Submit failed:...' error message. | ||
+ | * In the 'Task List' view there is now a new tree view with root node 'Uncategorized'. | ||
+ | ** Expand it to see your bug | ||
+ | ** A double click on the bug entry opens the Bugzilla editor with that bug. | ||
+ | |||
+ | There exists the concept of 'Context' which defines a set of files for each bug. This is activated by clicking on the 'Activate...' link in the 'Task List' view. |
Revision as of 10:26, 17 December 2013
With current versions of Eclipse (4.3) it is possible to create C/C++ projects for OpenOffice modules and use code assist, refactoring, lookup of definitions and declarations and all the other nice things that a modern IDE provides.
There are two different approaches to import the OpenOffice source code into Eclipse:
- The whole repository at once.
- You will need a not-yet-released nightly build of CDT to prevent major memory leaks and still have to increase memory limits for Eclipse.
- Module by module.
- This approach works with vanilla Eclipse. You only import individual modules (say sw/ and sfx/ into your workspace).
- This approach is described below.
Module by Module
The following describes how to set up Eclipse for the module by module approach.
Install Eclipse
Install a current version of Eclipse (http://www.eclipse.org/downloads/).
- Version 4.3 (Kepler) is known to work. Older 4.* versions may also work.
- A version with focus on C/C++ (titled "Eclipse IDE for C/C++ Developers) works best but other versions with the CDT addon installed should work also.
Prepare a workspace
Start Eclipse and select or create an empty workspace. The empty workspace is not a hard requirement but with one Eclipse project per OpenOffice module you may loose track otherwise. You can freely choose the location of the workspace, just don't use the OpenOffice source code directory.
Add module to workspace
- Open the import wizard via menu
File->New->Other
. - In the dialog choose the
C/C++ -> Makefile Project with Existing Code
wizard. - In the 'Import Existing Code' wizard
- use the 'Browse...' button to set the 'Existing Code Location' to the top-level directory of a module. This will also set the 'Project Name'.
- Select the correct tool chain for your platform.
- Tool chains for the individual platforms:
- Windows : Microsoft Visual C++
- Close the import wizard via the
Finish
button to start the module import.
- Close the import wizard via the
Setup project properties
A few changes to the project properties are necessary for the indexer to find all include files and use the correct compiler definitions.
- Open the properties dialog via the menu
Project->Properties
. - Activate the
C/C++ General->Paths and Symbols
page. - In the 'Languages' list (left center) activate 'GNU C++', (for some reason this name does not change even when you use the MSVC tool chain).
- Click 'Add...' and in the new dialog 'File system...' and browse to
main/solver/VERSION/PLATFORM/inc
. - Click 'OK' two times to get back to the properties dialog.
- Repeat the last two steps to add
main/solver/VERSION/PLATFORM/inc/offuh
for the header created for the UNO IDL files. Note that these includes only exist when theoffuh/
module has been built.browse tomain/solver/VERSION/PLATFORM/inc
. - Go to the 'Symbols' tab page.
- Click 'Add...' and add macro definitions
- Windows: WNT (empty value)
- Click OK to close the dialog.
- Rebuild the index via 'Project->C/C++ Index->Rebuild'. This time the indexer should runs longer because it has to index no only the files in the module but also all include files in
solver/
Using Mylyn for integrating Bugzilla
Eclipse has a very powerful plugin for integrating bug trackers into the IDE. Bugzilla is supported out of the box. Support for eg. Jira exists also. Setup for OpenOffice Bugzilla:
- Open the 'Task List' via 'Window->Show View->Task List'. Note that this is not the same view as 'Tasks'.
- If you do this for the first time you will see a 'Connect' link at the bottom of the new view. Click it.
- Otherwise open the 'Task Repositories' view via 'Window->Show View->Other...'
- In the 'Show View' dialog select 'Mylyn->Task Repositories'
- Click on the 'Add Task Repository...' button in the tool bar of the view.
In the 'Add Task Repository...' dialog:
- Choose 'Bugzilla (supports 3.6 and later)'
- Click 'Next >'
- Enter 'https://issues.apache.org/ooo/' ino the 'Server' field.
- Enter 'OpenOffice Bugzilla' or some other descriptive string into the 'Label' field.
- Fill out 'User ID' and 'Password' fields
- (Optional) Check the 'Save Password'
- Click 'Finish' and answer any popups as you like.
Search for tasks in Bugzilla in the 'Task List' view:
- Insert the task id in the search field. Click the now visible link 'Search repository for key or summary...'.
- In the 'Search' dialog:
- Make sure that 'Repository' is set to 'OpenOffice Bugzilla'
- The 'Task Key/ID' field should show the task id you entered earlier.
- Click on 'Search'
- A new editor opens in the editor area with the details about the found bug.
- If you don't like this view, click on the 'Open with Web Browser' button in the toolbar of the editor.
- There seems to be a bug that prevents submitting changes. I get a 'Submit failed:...' error message.
- In the 'Task List' view there is now a new tree view with root node 'Uncategorized'.
- Expand it to see your bug
- A double click on the bug entry opens the Bugzilla editor with that bug.
There exists the concept of 'Context' which defines a set of files for each bug. This is activated by clicking on the 'Activate...' link in the 'Task List' view.