Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Sequoyah/LFE documentation"

(org.eclipse.sequoyah.localization.tools)
 
(9 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
[http://www.eclipse.org/sequoyah/components/localization.php Overview]<br/>
 
[http://www.eclipse.org/sequoyah/components/localization.php Overview]<br/>
 
[[Image:Sequoyah_Localization_Diagram.png]]
 
[[Image:Sequoyah_Localization_Diagram.png]]
 +
 +
Since there are so much files, we'll briefly explain some classes that are more important to the understanding of the framework as a whole. If you have any comments/corrections/suggestions, please post them on [https://dev.eclipse.org/mailman/listinfo/sequoyah-dev our mailing list]!
  
 
= Plugins =
 
= Plugins =
Line 8: Line 10:
 
[[Image:Sequoyah_Localization_Stringeditor_Diagram.png]]
 
[[Image:Sequoyah_Localization_Stringeditor_Diagram.png]]
  
This is the plug-in that implements the editor used by the LF. <br>
+
This is the plug-in that implements the editor used by the Localization Framework. <br>
  
 
=== org.eclipse.sequoyah.localization.editor.datatype ===
 
=== org.eclipse.sequoyah.localization.editor.datatype ===
Line 23: Line 25:
 
An object of this type is the representation of a cell of the editor. It has a string value, a string comment, its position, its dirty condition and a list of other cell infos. This list will be populated if the children are the node of an array, and the CellInfo itself will be the root of it.
 
An object of this type is the representation of a cell of the editor. It has a string value, a string comment, its position, its dirty condition and a list of other cell infos. This list will be populated if the children are the node of an array, and the CellInfo itself will be the root of it.
  
It has a package '''''org.eclipse.sequoyah.localization.editor.datatype''''' that deals with data types, and so treats ColumnInfo, RowInfo, RowInfoLeaf and TranslationInfo types.<br>
+
* ColumnInfo
 +
An object of this type is the representation of a column of the editor. It has a string id, a string tooltip, a map of cell infos and a flag to indicate if the column can be deleted.
 +
 
 +
* TranslationInfo
 +
An object of this type is an extension of a ColumnInfo, with some special fields to hold information regarding language translations.
 +
 
 +
=== org.eclipse.sequoyah.localization.editor.model ===
 +
 
 +
* StringEditorPart
 +
This class handles the editor UI part, setting up the composite that will be exhibited to the user. Most of the configuration is done inside the ''createMainControl'' method. Also, this class has methods to deal with the columns in the editor and their state.
 +
 
 +
* CellEditingSupport
 +
This class is the core of the cell editing: it states if and how the cell can be edited, and what will be done after edition.
 +
 
 +
* StringEditorViewerModel
 +
This class handles the editor model, and so it has a list of columns, a map of rows, lots of listeners and a cell validator. It is another model representation that comes from the framework and is used by the UI, providing the editor data.
 +
 
 +
=== org.eclipse.sequoyah.localization.editor.model.actions ===
 +
 
 +
This package has a class for every action that the editor can perform. They are: AddArray, AddArrayItem, AddColumn, AddMultipleItems, AddSingleString, CloneColumn, ColapseExpandAll, HideShowAllColumns, HideShowColumn, MenuDropDown, RemoveColumn, RemoveKey, RevertToSaved, TranslateCell and TranslateColumn. Each action has its own peculiarities needed to perform the desired action.
 +
 
 +
=== org.eclipse.sequoyah.localization.editor.model.operations ===
 +
 
 +
 
  
It also has a package '''''org.eclipse.sequoyah.localization.editor.model''''' responsible for the editor model, and then deals with the UI part, cell editing and content providers. <br>
 
  
 
Another package '''''org.eclipse.sequoyah.localization.editor.model.actions''''' deals with the actions available, such as adding and removing items or columns, translation actions and visualization. Also related to these actions there's a package '''''org.eclipse.sequoyah.localization.editor.model.operations''''' to deal with operations that use the actions (almost like a wrapper to the actions).
 
Another package '''''org.eclipse.sequoyah.localization.editor.model.actions''''' deals with the actions available, such as adding and removing items or columns, translation actions and visualization. Also related to these actions there's a package '''''org.eclipse.sequoyah.localization.editor.model.operations''''' to deal with operations that use the actions (almost like a wrapper to the actions).
  
=== org.eclipse.sequoyah.localization.tools ===
+
== org.eclipse.sequoyah.localization.tools ==
 
[[Image:Sequoyah_Localization_Tools_Diagram.png]]
 
[[Image:Sequoyah_Localization_Tools_Diagram.png]]
  
 
This is the plug-in that holds utility methods. <br>
 
This is the plug-in that holds utility methods. <br>
  
It has a package '''''org.eclipse.sequoyah.localization.tools.actions''''' to deal with actions, like translation, search and grammar checking. It has a data model package '''''org.eclipse.sequoyah.localization.tools.datamodel''''', that handles file types and locale info. Related to this package, there is a package '''''org.eclipse.sequoyah.localization.tools.datamodel.node''''' to handle the nodes for these file types.<br>
+
=== org.eclipse.sequoyah.localization.tools.actions ===
 +
 
 +
This package has classes to deal with the actions of translations, filtering, searching and grammar checking.
 +
 
 +
It has a data model package '''''org.eclipse.sequoyah.localization.tools.datamodel''''', that handles file types and locale info. Related to this package, there is a package '''''org.eclipse.sequoyah.localization.tools.datamodel.node''''' to handle the nodes for these file types.<br>
  
 
There are three packages ('''''org.eclipse.sequoyah.localization.tools.extensions.*''''') to deal with extensions: grammar checker, translations and localization schemas. They have interfaces, implementations and providers to those extension services.<br>
 
There are three packages ('''''org.eclipse.sequoyah.localization.tools.extensions.*''''') to deal with extensions: grammar checker, translations and localization schemas. They have interfaces, implementations and providers to those extension services.<br>
Line 40: Line 68:
 
Also there are packages to handle persistence ('''''org.eclipse.sequoyah.localization.tools.persistence''''') and preferences ('''''org.eclipse.sequoyah.localization.tools.preferences'''''). There is one package ('''''org.eclipse.sequoyah.localization.tools.managers''''') that deals with managers ranging from project issues to the extensions above mentioned.
 
Also there are packages to handle persistence ('''''org.eclipse.sequoyah.localization.tools.persistence''''') and preferences ('''''org.eclipse.sequoyah.localization.tools.preferences'''''). There is one package ('''''org.eclipse.sequoyah.localization.tools.managers''''') that deals with managers ranging from project issues to the extensions above mentioned.
  
=== org.eclipse.sequoyah.localization.android ===
+
== org.eclipse.sequoyah.localization.android ==
 
[[Image:Sequoyah_Localization_Android_Diagram.png]]
 
[[Image:Sequoyah_Localization_Android_Diagram.png]]
  
This plug-in implements Android specific stuff.<br>
+
This plug-in implements Android related features.<br>
 +
 
 +
It has an activator and specializes the LocalizationSchema and LocaleAttribute. <br>
 +
 
 +
The class AndroidLocaleAttribute extends LocaleAttribute in order to provide attributes specific for Android, such as country code, network code, region, screen size, among others. The complete list os qualifiers can be found [http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources here]. This class holds such attributes, and also contains methods to validate user input in the UI. <br>
  
It has an activator and specializes the LocalizationSchema and LocaleAttribute and also uses and XML Parser filter (for which purpose? which methods it provides?).<br>
+
This plug-in also uses and XML Parser filter (for which purpose? which methods it provides?).<br>
  
 
It has a package that contains specialized file types, and another one with specific managers for Android files and nodes and providers.(which?)
 
It has a package that contains specialized file types, and another one with specific managers for Android files and nodes and providers.(which?)

Latest revision as of 12:57, 8 April 2011

Overview

Overview
Sequoyah Localization Diagram.png

Since there are so much files, we'll briefly explain some classes that are more important to the understanding of the framework as a whole. If you have any comments/corrections/suggestions, please post them on our mailing list!

Plugins

org.eclipse.sequoyah.localization.stringeditor

Sequoyah Localization Stringeditor Diagram.png

This is the plug-in that implements the editor used by the Localization Framework.

org.eclipse.sequoyah.localization.editor.datatype

This package is responsible for dealing with data types. It's classes are:

  • RowInfo

An object of this type is the root node of a linked list. It also has a string key and a list of RowInfoLeaf.

  • RowInfoLeaf

An object of this type is a node on the linked list of a RowInfo. It has a HashMap of cells, which will contain the information, and a link to its parent and its position on the list.

  • CellInfo

An object of this type is the representation of a cell of the editor. It has a string value, a string comment, its position, its dirty condition and a list of other cell infos. This list will be populated if the children are the node of an array, and the CellInfo itself will be the root of it.

  • ColumnInfo

An object of this type is the representation of a column of the editor. It has a string id, a string tooltip, a map of cell infos and a flag to indicate if the column can be deleted.

  • TranslationInfo

An object of this type is an extension of a ColumnInfo, with some special fields to hold information regarding language translations.

org.eclipse.sequoyah.localization.editor.model

  • StringEditorPart

This class handles the editor UI part, setting up the composite that will be exhibited to the user. Most of the configuration is done inside the createMainControl method. Also, this class has methods to deal with the columns in the editor and their state.

  • CellEditingSupport

This class is the core of the cell editing: it states if and how the cell can be edited, and what will be done after edition.

  • StringEditorViewerModel

This class handles the editor model, and so it has a list of columns, a map of rows, lots of listeners and a cell validator. It is another model representation that comes from the framework and is used by the UI, providing the editor data.

org.eclipse.sequoyah.localization.editor.model.actions

This package has a class for every action that the editor can perform. They are: AddArray, AddArrayItem, AddColumn, AddMultipleItems, AddSingleString, CloneColumn, ColapseExpandAll, HideShowAllColumns, HideShowColumn, MenuDropDown, RemoveColumn, RemoveKey, RevertToSaved, TranslateCell and TranslateColumn. Each action has its own peculiarities needed to perform the desired action.

org.eclipse.sequoyah.localization.editor.model.operations

Another package org.eclipse.sequoyah.localization.editor.model.actions deals with the actions available, such as adding and removing items or columns, translation actions and visualization. Also related to these actions there's a package org.eclipse.sequoyah.localization.editor.model.operations to deal with operations that use the actions (almost like a wrapper to the actions).

org.eclipse.sequoyah.localization.tools

Sequoyah Localization Tools Diagram.png

This is the plug-in that holds utility methods.

org.eclipse.sequoyah.localization.tools.actions

This package has classes to deal with the actions of translations, filtering, searching and grammar checking.

It has a data model package org.eclipse.sequoyah.localization.tools.datamodel, that handles file types and locale info. Related to this package, there is a package org.eclipse.sequoyah.localization.tools.datamodel.node to handle the nodes for these file types.

There are three packages (org.eclipse.sequoyah.localization.tools.extensions.*) to deal with extensions: grammar checker, translations and localization schemas. They have interfaces, implementations and providers to those extension services.

Also there are packages to handle persistence (org.eclipse.sequoyah.localization.tools.persistence) and preferences (org.eclipse.sequoyah.localization.tools.preferences). There is one package (org.eclipse.sequoyah.localization.tools.managers) that deals with managers ranging from project issues to the extensions above mentioned.

org.eclipse.sequoyah.localization.android

Sequoyah Localization Android Diagram.png

This plug-in implements Android related features.

It has an activator and specializes the LocalizationSchema and LocaleAttribute.

The class AndroidLocaleAttribute extends LocaleAttribute in order to provide attributes specific for Android, such as country code, network code, region, screen size, among others. The complete list os qualifiers can be found here. This class holds such attributes, and also contains methods to validate user input in the UI.

This plug-in also uses and XML Parser filter (for which purpose? which methods it provides?).

It has a package that contains specialized file types, and another one with specific managers for Android files and nodes and providers.(which?)

Back to the top