Bug 96798 - allow associating the common palette with mime type
allow associating the common palette with mime type
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Palette
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Stanislav Aubrecht
issues@platform
: API, API_REVIEW_FAST
Depends on:
Blocks: 90213
  Show dependency treegraph
 
Reported: 2007-02-28 16:23 UTC by Stanislav Aubrecht
Modified: 2008-12-22 10:02 UTC (History)
0 users

See Also:
Issue Type: TASK
:


Attachments
proposed implementation (32.63 KB, patch)
2007-02-28 16:25 UTC, Stanislav Aubrecht
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Aubrecht 2007-02-28 16:23:23 UTC
the current palette api mandates that an editor must insert a PaletteController
instance into its Lookup if it wants to associate the palette with it.

i want to extend the palette module API to include an option to associate
palette content with document's mime type: palette providers will register their
PaletteController instance in XML layer under "Editors/<mime type>" and when an
editor window with this mime type is activated the palette module will show the
appropriate palette content.
Comment 1 Stanislav Aubrecht 2007-02-28 16:25:02 UTC
Created attachment 38982 [details]
proposed implementation
Comment 2 Stanislav Aubrecht 2007-03-07 12:03:55 UTC
if there are no objections, i'll integrate this tomorrow
Comment 3 Jaroslav Tulach 2007-03-07 14:02:03 UTC
There is a code that searches thru activated nodes of TopComponent and then 
gets DataObject and then FileObject, I'd like to change it to:

for (FileObject fo : tc.getLookup().lookupAll(FileObject.class)) {
 // do what you want
}

imho, it should do the same and it is the preferred way to get FileObject from 
a TopComponent. Of course, change it only if it works for you.
Comment 4 Stanislav Aubrecht 2007-03-08 12:02:55 UTC
merged to trunk:
(tc.getLookup().lookupAll(FileObject.class) doesn't work for my unit tests)

Checking in test/unit/src/org/netbeans/spi/palette/mf-layer.xml;
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/mf-layer.xml,v  <-- 
mf-layer.xml
initial revision: 1.1
done
Checking in test/unit/src/org/netbeans/spi/palette/AbstractPaletteTestHid.java;
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/AbstractPaletteTestHid.java,v
 <--  AbstractPaletteTestHid.java
new revision: 1.5; previous revision: 1.4
done
RCS file:
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/IDEInitializer.java,v
done
Checking in test/unit/src/org/netbeans/spi/palette/IDEInitializer.java;
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/IDEInitializer.java,v 
<--  IDEInitializer.java
initial revision: 1.1
done
RCS file:
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/MyLayerPaletteFactory.java,v
done
Checking in test/unit/src/org/netbeans/spi/palette/MyLayerPaletteFactory.java;
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/MyLayerPaletteFactory.java,v
 <--  MyLayerPaletteFactory.java
initial revision: 1.1
done
RCS file:
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/PaletteSwitchTest.java,v
done
Checking in test/unit/src/org/netbeans/spi/palette/PaletteSwitchTest.java;
/cvs/core/palette/test/unit/src/org/netbeans/spi/palette/PaletteSwitchTest.java,v
 <--  PaletteSwitchTest.java
initial revision: 1.1
done
Checking in src/org/netbeans/spi/palette/PaletteSwitch.java;
/cvs/core/palette/src/org/netbeans/spi/palette/PaletteSwitch.java,v  <-- 
PaletteSwitch.java
new revision: 1.2; previous revision: 1.1
done
RCS file: /cvs/core/palette/src/org/netbeans/spi/palette/PaletteModule.java,v
done
Checking in src/org/netbeans/spi/palette/PaletteModule.java;
/cvs/core/palette/src/org/netbeans/spi/palette/PaletteModule.java,v  <-- 
PaletteModule.java
initial revision: 1.1
done
Checking in manifest.mf;
/cvs/core/palette/manifest.mf,v  <--  manifest.mf
new revision: 1.12; previous revision: 1.11
done
Checking in nbproject/project.xml;
/cvs/core/palette/nbproject/project.xml,v  <--  project.xml
new revision: 1.9; previous revision: 1.8
done
Checking in api/doc/changes/apichanges.xml;
/cvs/core/palette/api/doc/changes/apichanges.xml,v  <--  apichanges.xml
new revision: 1.16; previous revision: 1.15
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo