Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 131078 - JavaFormatter should respect project settings
Summary: JavaFormatter should respect project settings
Status: VERIFIED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Tools (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Dave Steinberg CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 75925
Blocks:
  Show dependency tree
 
Reported: 2006-03-09 08:44 EST by Eike Stepper CLA
Modified: 2008-01-28 16:46 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Eike Stepper CLA 2006-03-09 19:20:24 EST
Here is the snippet which I use to retrieve the formatter profile options for a given target path:

        String projectName = new Path(targetPath).segment(0);
        if (projectName != null)
        {
          IProject project = ResourcesHelper.ROOT.getProject(projectName);
          if (project != null)
          {
            IJavaProject javaProject = JavaCore.create(project);
            if (javaProject != null)
            {
              options = javaProject.getOptions(true);
            }
          }
        }
Comment 2 Dave Steinberg CLA 2006-05-01 10:59:12 EDT
This was fixed as part of bug 75925 and has now been committed to CVS.
Comment 3 Nick Boldt CLA 2006-05-02 11:17:48 EDT
Fixed in 2.2.0RC2 (S200605020900)
Comment 4 Nick Boldt CLA 2008-01-28 16:46:28 EST
Move to verified as per bug 206558.