patch by unknown@simplemachines.org r=timeless rs=brendan git-svn-id: svn://10.0.0.236/trunk@185269 18797224-902f-48f8-a5cc-f745e15eee43
493 lines
14 KiB
HTML
493 lines
14 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
|
<META NAME="Author" CONTENT="Jack Palevich mailto:palevich@netscape.com">
|
|
<META NAME="GENERATOR" CONTENT="Mozilla/4.0b4 [en] (WinNT; I) [Netscape]">
|
|
<TITLE>Composer Plug-in SDK Release Notes</TITLE>
|
|
</HEAD>
|
|
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#FF0000" ALINK="#000088">
|
|
|
|
<H1>
|
|
Composer Plug-in SDK Release Notes</H1>
|
|
|
|
<DT>
|
|
<FONT SIZE=-1>Copyright (C) 1997 Netscape Communications, Inc. All
|
|
Rights Reserved</FONT></DT>
|
|
|
|
<DT>
|
|
<FONT SIZE=-1>Version 26</FONT></DT>
|
|
|
|
<DT>
|
|
<FONT SIZE=-1>4/29/97</FONT></DT>
|
|
|
|
<DT>
|
|
<FONT SIZE=-1>Jack Palevich x6701 <A HREF="mailto:palevich@netscape.com">palevich@netscape.com</A></FONT></DT>
|
|
|
|
<H2>
|
|
Introduction</H2>
|
|
The Composer Plug-in SDK allows you to develop plug-ins for Netscape Composer.
|
|
Please refer to the on-line documentation, the sample plugins, and the
|
|
<A HREF="http://developer.netscape.com/library/documentation/communicator/composer/plugin/index.htm">developer's
|
|
guide</A> for more information.
|
|
<H2>
|
|
What's New</H2>
|
|
Version 26 (For Netscape Communicator 4.0PR4)
|
|
<UL>
|
|
<LI>
|
|
Added a new method, public static void Document.editDocument(String
|
|
documentURL). This method lets you open an arbitrary URL for editing. This
|
|
method is asynchronous. It does not return any status. You can use it to
|
|
programatically open an arbitrary URL for editing by the user. You don't
|
|
even have to be in a Composer Plug-in when you call the method. You can
|
|
call it from an applette, or JavaScript, or wherever.</LI>
|
|
|
|
<LI>
|
|
Added a sample plug-in, EditHomePage, that shows how to use Document.editDocument.</LI>
|
|
|
|
<LI>
|
|
Added a sample plug-in, RedirectTest, that shows how to redirect "edit"
|
|
requests.</LI>
|
|
|
|
<LI>
|
|
You must now use JDK 1.1, or a JDK 1.1 compatable IDE such as Symantec
|
|
Cafe 1.5.1 with the 1.1 Preview, to develop Composer Plug-ins.</LI>
|
|
|
|
<LI>
|
|
Removed fakejava.zip -- it is not needed now that JDK 1.1 is required.</LI>
|
|
|
|
<LI>
|
|
Updated the DocInfo and IFCTest samples to use the JDK 1.1 standard
|
|
API for ResourceBundles and Character.IsWhiteSpace.</LI>
|
|
|
|
<LI>
|
|
Updated the AddButton sample to ask for the UniversalConnect privilege.
|
|
(This principle is required in order to read from a URL.)</LI>
|
|
|
|
<LI>
|
|
Note that JDK 1.1 will issue deprecated interface warnings when compiling
|
|
some of the samples. If you attempt to fix these warnings, you may run
|
|
into trouble. The reason is that some of the new JDK 1.1 methods (especially
|
|
new features of AWT 1.1) are not supported by Communicator 4.0. When in
|
|
doubt, stick to AWT 1.0 features.</LI>
|
|
</UL>
|
|
Version 25
|
|
<UL>
|
|
<LI>
|
|
Two new methods have been added to Document: getText and setText. These
|
|
convenience methods allow you to get and set the whole raw HTML text of
|
|
the document. This makes it easier to write Composer Plug-ins that perform
|
|
operations on the raw HTML text.</LI>
|
|
|
|
<LI>
|
|
The EditRaw and IFCTest sample plug-ins have been updated to use Document.getText
|
|
and Document.setText. About 10 lines were saved in each sample.</LI>
|
|
</UL>
|
|
Version 24 (For Netscape Communicator 4.0 PR3)
|
|
<UL>
|
|
<LI>
|
|
You can now create and use jar files instead of zip files to hold your
|
|
Composer Plug-in classes. Using .zip files will continue to work. However,
|
|
the benefits of jar files are:</LI>
|
|
|
|
<UL>
|
|
<LI>
|
|
Since they don't end in .zip, users won't be tempted to unzip them.</LI>
|
|
|
|
<LI>
|
|
They are clearly identified as Java files, rather than generic archive
|
|
files.</LI>
|
|
|
|
<LI>
|
|
They can be compressed. (However, this feature is not working for Composer
|
|
4.0 PR3.)</LI>
|
|
|
|
<LI>
|
|
They can be signed. For more information, look at the Java signing
|
|
and security release notes for PR3.</LI>
|
|
</UL>
|
|
|
|
<LI>
|
|
Communicator 4.0 has a new security model for Java code. When you want
|
|
to do something special, you ask the netscape security manager for permission.
|
|
It, in turn, asks the user for permission. If the user grants you the permission,
|
|
your code is free perform the action.</LI>
|
|
|
|
<UL>
|
|
<LI>
|
|
The AddApplet and AddButton sample Composer Plug-ins have been enhanced
|
|
to use this new security model.</LI>
|
|
|
|
<LI>
|
|
The Composer Plug-in kit's classes.zip file now includes a stub version
|
|
of the class netscape.security.SecurityManager. This will allow you to
|
|
use your existing Java development environment to write code that calls
|
|
the SecurityManager.</LI>
|
|
|
|
<LI>
|
|
If your plug-in needs to read or write files, or load a dynamic library,
|
|
or otherwise do something that might be dangerous, you will have to upgrade
|
|
to this new security model.For more information, look at the Java signing
|
|
and security release notes for PR3.</LI>
|
|
</UL>
|
|
|
|
<LI>
|
|
The pre-built sample plug-ins, cpTest.jar, now come as a jar file instead
|
|
of a zip file.</LI>
|
|
</UL>
|
|
Version 23
|
|
<UL>
|
|
<LI>
|
|
The bug where the plug-in's window comes up behind the Composer's window
|
|
has been fixed. The fix is for plug-ins to call requestFocus() after they
|
|
call show(). The samples AddLayer, DocInfo and EditRaw have been updated
|
|
to include this fix.</LI>
|
|
|
|
<LI>
|
|
The Java 1.1 classes that used to be in classes.zip have been moved
|
|
to a separate zip file, fakejava11.zip. If you are developing under JDK
|
|
1.0.2, include both classes.zip and fakejava11.zip in your classpath. If
|
|
you are developing under JDK 1.1, only include classes.zip.</LI>
|
|
|
|
<LI>
|
|
The Test framework's -in option now works again. It was broken because
|
|
it was using FileReader, which does not appear to work under JDK 1.0.2.</LI>
|
|
|
|
<LI>
|
|
An event model has been added to Composer Plug-ins. This event model,
|
|
which will work with Communicator PR3, allows you to write a Plug-in that
|
|
can automaticly perform actions when certain events occur. Check the javadoc
|
|
and regular documentation for Plugin and for Document for more information.</LI>
|
|
|
|
<LI>
|
|
The source code for the test framework classes is now included in the
|
|
SDK.</LI>
|
|
|
|
<LI>
|
|
A sample Composer Plug-in .ZIP file, cpTest.zip, is now included in
|
|
the SDK. If you are having trouble packaging your plug-in, compare the
|
|
cpTest.zip file to your own zip file. This should help you see what's wrong.</LI>
|
|
</UL>
|
|
Version 22
|
|
<UL>
|
|
<LI>
|
|
Fixed mistakes in AddApplets comments.</LI>
|
|
|
|
<LI>
|
|
Added dialog.dispose() calls to each of the samples that uses AWT dialogs.
|
|
This cleans up any native OS resources (such as native windows) that the
|
|
dialogs might be using.</LI>
|
|
</UL>
|
|
Version 21
|
|
<UL>
|
|
<LI>
|
|
Various small improvements have been made to the sample plug-ins.</LI>
|
|
|
|
<UL>
|
|
<LI>
|
|
The IFCTest plug-in is now lets you edit HTML text. IFCTest is just
|
|
like EditRaw, except that EditRaw uses the AWT, while IFCTest uses AWT.
|
|
You can compare the two plug-ins to see the differences between the two
|
|
toolkits.</LI>
|
|
|
|
<LI>
|
|
The window close boxes now work correctly in all the sample plug-ins.</LI>
|
|
|
|
<LI>
|
|
The AddApplet sample now calls itself "Insert:Nervous Text", which
|
|
is what it does.</LI>
|
|
|
|
<LI>
|
|
The DocumentInfo plug-in's OK button has been removed, since the close
|
|
box serves the same purpose.</LI>
|
|
</UL>
|
|
|
|
<LI>
|
|
The Composer Plug-in kit now comes with a dummy version of java.lang.SecurityManager.
|
|
This is required so that you can compile code that calls SecurityManager.setScopePermission.
|
|
SetScopePermission is a feature of the Netscape Communicator security model.
|
|
You will have to call it if your plug-in is planning on using privilidged
|
|
methods. For example, the following code needs to be used to load a library:</LI>
|
|
|
|
<DT>
|
|
</DT>
|
|
|
|
<UL>
|
|
<DT>
|
|
SecurityManager.setScopePermission();</DT>
|
|
|
|
<DT>
|
|
System.loadLibrary(...);</DT>
|
|
|
|
<DT>
|
|
SecurityManager.resetScopePermission();</DT>
|
|
</UL>
|
|
|
|
<DT>
|
|
The call to setScopePermission annotates the current stack frame to
|
|
allow it to make privileged calls.</DT>
|
|
</UL>
|
|
Version 20
|
|
<UL>
|
|
<LI>
|
|
The image encoder test now creates a test image that's 512 x 512 pixels.
|
|
This is large enough to help identify performace issues with your image
|
|
encoder.</LI>
|
|
</UL>
|
|
Version 19
|
|
<UL>
|
|
<LI>
|
|
Fixed bugs related to selection comments. Added the "stickyAfter" concept.
|
|
This is an obscure feature of selections that most developers can safely
|
|
ignore. We added it for completeness, so that all the editor's state was
|
|
represented in the Document object.</LI>
|
|
|
|
<LI>
|
|
Added an <A HREF="#i18n issues">Internationalization Issues</A> section
|
|
at the bottom of these notes.</LI>
|
|
</UL>
|
|
Version 18
|
|
<UL>
|
|
<LI>
|
|
Removed getAbout() methods from Plugin and ImageEncoder. Developers
|
|
wishing to provide about boxes should implement the functionality themselves.
|
|
(For example, you could add a button to your dialog box that brings up
|
|
an about box.)</LI>
|
|
</UL>
|
|
Version 17
|
|
<UL>
|
|
<LI>
|
|
Added a new class, netscape.plugin.composer.ImageEncoder. Image encoders
|
|
extend the kinds of image file formats that Composer can write. Your Composer
|
|
Plug-in can also find and use existing image encoders to write image files.
|
|
See the javadoc for ImageEncoder for more information.</LI>
|
|
|
|
<LI>
|
|
Added a sample ImageEncoder called TextImageEncoder.</LI>
|
|
|
|
<LI>
|
|
Added a test framework, TestImageEncoder, for testing image encoders.</LI>
|
|
|
|
<LI>
|
|
Added a new sample Composer Plug-in, AddApplet, which documents how
|
|
to use the LOCALDATA property to add arbitrary local data files to a Composer
|
|
document.</LI>
|
|
</UL>
|
|
Version 16
|
|
<UL>
|
|
<LI>
|
|
Tokens are now Clonable.</LI>
|
|
</UL>
|
|
Version 15
|
|
<UL>
|
|
<LI>
|
|
The classes directory now includes all the JDK 1.1 internationalization
|
|
and character reader/writer classes required to create plugins. So you
|
|
can develop using a JDK 1.0.2 compatible development environment.</LI>
|
|
|
|
<LI>
|
|
The examples have been downgraded to work with JDK 1.0.2. You will
|
|
get some 'deprecated' warnings when you compile under JDK 1.1.</LI>
|
|
</UL>
|
|
Version 14
|
|
<UL>
|
|
<LI>
|
|
Added missing classes TestDocumentReader and TestDocumentWriter.</LI>
|
|
|
|
<LI>
|
|
DocInfo example now uses JDK1.1 style resource bundles.</LI>
|
|
|
|
<LI>
|
|
Entity.entities added. This method returns an enumeration of known
|
|
entities.</LI>
|
|
</UL>
|
|
Version 13
|
|
<UL>
|
|
<LI>
|
|
Fixed race condition in EditRaw.</LI>
|
|
|
|
<LI>
|
|
Did minor cleanup of EditRaw.</LI>
|
|
|
|
<LI>
|
|
Started AddLayer sample.</LI>
|
|
</UL>
|
|
Version 12
|
|
<UL>
|
|
<LI>
|
|
Fixed -in option of navigator.test.plugin.composer.Test.</LI>
|
|
|
|
<LI>
|
|
Renamed SelectedHTMLStream to SelectedHTMLReader.</LI>
|
|
|
|
<LI>
|
|
Updated code to use JDK 1.1 Beta 2 classes. Primarily this meant converting
|
|
from CharInputStream to Reader and CharOutputStream to Writer.</LI>
|
|
|
|
<LI>
|
|
Use Java 1.1 version of javadoc.</LI>
|
|
</UL>
|
|
Version 11
|
|
<UL>
|
|
<LI>
|
|
Added class netscape.plugin.composer.io.SelectedHTMLStream.</LI>
|
|
|
|
<LI>
|
|
Reworked selection-modifying plugins to use SelectedHTMLStream.</LI>
|
|
|
|
<LI>
|
|
Removed some debugging printlns.</LI>
|
|
</UL>
|
|
Version 10
|
|
<UL>
|
|
<LI>
|
|
Added IFCTest example of how to use the IFC from a plugin.</LI>
|
|
|
|
<LI>
|
|
Factory.getPlugins now returns an Enumeration instead of a Vector.</LI>
|
|
</UL>
|
|
Version 9
|
|
<UL>
|
|
<LI>
|
|
Added Test.perform() to simplify testing. It is now easier to test
|
|
your plugin from within an IDE such as Symantec Cafe.</LI>
|
|
|
|
<LI>
|
|
Test.test() now calls System.exit. This ensures that the test terminates,
|
|
even if the plugin or the awt has left threads running.</LI>
|
|
|
|
<LI>
|
|
Fixed word count in DocInfo sample.</LI>
|
|
|
|
<LI>
|
|
Added more information to the DocInfo sample -- now it prints out the
|
|
base URL, the working directory, and the working directory URL.</LI>
|
|
</UL>
|
|
Version 8
|
|
<UL>
|
|
<LI>
|
|
Renamed Plugin1 to TagStrip</LI>
|
|
|
|
<LI>
|
|
Renamed Plugin2 to EditRaw</LI>
|
|
|
|
<LI>
|
|
Renamed Plugin3 to Colorize</LI>
|
|
|
|
<LI>
|
|
Added missing Test*Stream classes so that the SDK's test actually
|
|
works.</LI>
|
|
|
|
<LI>
|
|
Minor javadoc documentation improvements.</LI>
|
|
</UL>
|
|
Version 7
|
|
<H3>
|
|
Samples:</H3>
|
|
|
|
<UL>
|
|
<LI>
|
|
A new sample plugin: AddButton, which shows how to add an image to
|
|
a document.</LI>
|
|
|
|
<LI>
|
|
A new sample plugin: DocumentInfo, which shows how to access relative
|
|
and absolute image URLs.</LI>
|
|
|
|
<LI>
|
|
Upgraded Plugin2 to show how to implement an "Apply" dialog button.</LI>
|
|
</UL>
|
|
|
|
<H3>
|
|
API changes:</H3>
|
|
|
|
<UL>
|
|
<LI>
|
|
Now requires Java 1.1 - Uses CharInputStream, CharOutputStream.</LI>
|
|
|
|
<LI>
|
|
Removed all attempts to help with internationalization. You should
|
|
use the Java 1.1 ResourceBundle framework.</LI>
|
|
|
|
<LI>
|
|
netscape.plugin.composer.Document - The document text is now accessed
|
|
via Char streams, rather than String objects.</LI>
|
|
|
|
<LI>
|
|
netscape.plugin.composer.io - The Unicode stream classes have been
|
|
removed in favor of the standard Java 1.1 Char streams.</LI>
|
|
|
|
<LI>
|
|
netscape.plugin.composer.Plugin - perform now returns a boolean result.
|
|
"True" means the plugin succeeded. "False" means the plugin failed.</LI>
|
|
</UL>
|
|
|
|
<H3>
|
|
Test changes:</H3>
|
|
|
|
<UL>
|
|
<LI>
|
|
The test now allows you to set both the input file and the output
|
|
file. This allows you to capture the output of the test.</LI>
|
|
</UL>
|
|
|
|
<H3>
|
|
Documentation changes:</H3>
|
|
|
|
<UL>
|
|
<LI>
|
|
The JavaDoc images are now supplied with the documentation, which should
|
|
make the documentation easier to read.</LI>
|
|
</UL>
|
|
|
|
<H2>
|
|
Notes</H2>
|
|
Plug-ins created with this API will work with Netscape Communicator b2.
|
|
They will not work with Communicator pre-release 1, because that version
|
|
of the Communicator uses an earlier version of the Composer Plug-in API.
|
|
We are not supporting Composer Plugins on Communicator 4.0 pre-release
|
|
1.
|
|
<H2>
|
|
<A NAME="i18n issues"></A>Internationalization Issues</H2>
|
|
The intention is that you will use the Java 1.1 internationalization classes
|
|
to internationalize your composer plug-in API. Unfortunately, Java 1.1
|
|
is still in beta, and so not all of the necessary classes are available
|
|
for you to use. There are several issues here:
|
|
<OL>
|
|
<LI>
|
|
The JDK 1.1 classes are still being defined, so they are buggy and
|
|
their API may change.</LI>
|
|
|
|
<LI>
|
|
Most Java IDEs support JDK 1.0.2, and so do not contain any of the
|
|
JDK 1.1 classes.</LI>
|
|
|
|
<LI>
|
|
Netscape Communicator version 4.0b2 doesn't have the full JDK 1.1 internationalization
|
|
classes.</LI>
|
|
</OL>
|
|
We suggest that you do the following:
|
|
<UL>
|
|
<LI>
|
|
Write your UI using the new JDK 1.1 ResourceBundle classes. By putting
|
|
your resource strings in a resource bundle, you will make it easier to
|
|
internationalize your plugin.</LI>
|
|
|
|
<LI>
|
|
Look at the DocumentInfo sample plug-in. This shows you the style you
|
|
should follow when using the ResourceBundle class. If you stick to this
|
|
subset of the full ResourceBundle functionality, your plug-in will work,
|
|
and will be easy to port to the final JDK 1.1 interfaces.</LI>
|
|
|
|
<LI>
|
|
We have provided a JDK 1.0.2 compatable version of the ResourceBundle
|
|
classes in the Composer Plug-in Kit. This means that you can develop your
|
|
plug-in using a JDK1.0.2 IDE, such as Symantec Visual Cafe.</LI>
|
|
|
|
<LI>
|
|
Expect to have to slightly tweak your use of resource bundles before
|
|
Communicator 4.0 goes final.</LI>
|
|
</UL>
|
|
|
|
</BODY>
|
|
</HTML>
|