eclox/0000755000076400007640000000000012166321517011266 5ustar willywillyeclox/eclox.ui/0000755000076400007640000000000012166321432013010 5ustar willywillyeclox/eclox.ui/META-INF/0000755000076400007640000000000012166321431014147 5ustar willywillyeclox/eclox.ui/META-INF/MANIFEST.MF0000644000076400007640000000073312166012446015607 0ustar willywillyManifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Eclox User Interface Bundle-SymbolicName: org.gna.eclox.ui; singleton:=true Bundle-Version: 0.10.0 Bundle-Activator: eclox.ui.Plugin Bundle-Vendor: Guillaume Brocker Bundle-Localization: Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.ui.console, org.gna.eclox.core, org.eclipse.core.resources, org.eclipse.ui.ide, org.eclipse.ui.forms, org.eclipse.ui.editors Eclipse-LazyStart: true eclox/eclox.ui/src/0000755000076400007640000000000012166321431013576 5ustar willywillyeclox/eclox.ui/src/eclox/0000755000076400007640000000000012166321431014710 5ustar willywillyeclox/eclox.ui/src/eclox/ui/0000755000076400007640000000000012166321432015326 5ustar willywillyeclox/eclox.ui/src/eclox/ui/IPreferences.java0000644000076400007640000000366412166012446020556 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; /** * Provides all preference names of the plugin. * * @author gbrocker */ public interface IPreferences { /** * Constant name for the build history content. */ // public static final String BUILD_HISTORY_CONTENT = "build-history-content"; /** * Constant name for the build history size. */ // public static final String BUILD_HISTORY_SIZE = "build-history-size"; /** * Constant name for the build job history size. */ public static final String BUILD_HISTORY_SIZE = "buildHistory.size"; /** * Constant name for workspace autosave flag. * * @see AUTO_SAVE_NEVER * @see AUTO_SAVE_ALWAYS * @see AUTO_SAVE_ASK */ public static final String AUTO_SAVE = "editor.autosave"; /** * Constant for AUTO_SAVE never state. * * @see AUTO_SAVE * @see AUTO_SAVE_ALWAYS * @see AUTO_SAVE_ASK */ public static final String AUTO_SAVE_NEVER = "never"; /** * Constant for AUTO_SAVE always state. * * @see AUTO_SAVE * @see AUTO_SAVE_NEVER * @see AUTO_SAVE_ASK */ public static final String AUTO_SAVE_ALWAYS = "always"; /** * Constant for AUTO_SAVE ask state. * * @see AUTO_SAVE * @see AUTO_SAVE_ALWAYS * @see AUTO_SAVE_NEVER */ public static final String AUTO_SAVE_ASK = "ask"; /** * Constant name for the automatic value string escapes. */ public static final String HANDLE_ESCAPED_VALUES = "editor.handleEscapedValues"; } eclox/eclox.ui/src/eclox/ui/console/0000755000076400007640000000000012166321431016767 5ustar willywillyeclox/eclox.ui/src/eclox/ui/console/ConsolePage.java0000644000076400007640000001616212166012446022042 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013 Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.console; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.IJobChangeListener; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IActionBars; import org.eclipse.ui.console.ConsolePlugin; import org.eclipse.ui.console.IConsoleConstants; import org.eclipse.ui.part.Page; import eclox.core.doxygen.BuildJob; import eclox.core.doxygen.IBuildJobListener; import eclox.ui.console.action.CancelJob; import eclox.ui.console.action.ClearLog; import eclox.ui.console.action.LockScroll; import eclox.ui.console.action.RemoveConsole; /** * Implements the page for the doxygen console. * * @author gbrocker */ public class ConsolePage extends Page { /** * Implements a build job listener that will maintain the console up-to-date * with the job log. * * @author gbrocker */ private class MyBuildJobListener implements IBuildJobListener { /** * @see eclox.core.doxygen.IBuildJobListener#buildJobLogCleared(eclox.core.doxygen.BuildJob) */ public void buildJobLogCleared(BuildJob job) { ConsolePlugin.getStandardDisplay().asyncExec( new Runnable() { public void run() { clear(); } } ); } /** * @see eclox.core.doxygen.IBuildJobListener#buildJobLogUpdated(eclox.core.doxygen.BuildJob, java.lang.String) */ public void buildJobLogUpdated(BuildJob job, String output) { final String text = new String( output ); ConsolePlugin.getStandardDisplay().asyncExec( new Runnable() { public void run() { append( text ); } } ); } /** * @see eclox.core.doxygen.IBuildJobListener#buildJobRemoved(eclox.core.doxygen.BuildJob) */ public void buildJobRemoved(BuildJob job) {} } /** * @brief Implements a job change listener used to update the interface state according to the * build job events. * * @author gbrocker */ private class MyJobChangedListener implements IJobChangeListener { public void aboutToRun(IJobChangeEvent event) { ConsolePlugin.getStandardDisplay().syncExec( new Runnable() { public void run() { updateActionStates(); } } ); } public void awake(IJobChangeEvent event) {} public void done(final IJobChangeEvent event) { ConsolePlugin.getStandardDisplay().syncExec( new Runnable() { public void run() { updateActionStates(); IStatus status = event.getResult(); if( status.isOK() ) { append( "*** Build finished!" ); } else { append( "*** Build aborted! " ); append( status.getMessage() ); } } } ); } public void running(IJobChangeEvent event) {} public void scheduled(IJobChangeEvent event) {} public void sleeping(IJobChangeEvent event) {} } private boolean scrollLocked = false; ///< a boolean telling if the console scrolling is locked or not private StyledText styledText; ///< the control used to display text private Console console; ///< the console the page is attached to private CancelJob cancelJobAction; ///< the action that cancels the build job private MyBuildJobListener jobListener; ///< the build job listener private MyJobChangedListener jobChangedListener; ///< the build job change listener /** * Constructor * * @param console the console the page is attached to */ public ConsolePage( Console console ) { this.console = console; } /** * Appends text to the console. * * @param text a string containing the text to append */ private void append( String text ) { assert styledText != null; styledText.append( text ); scroll(); } /** * Clears the console content. */ private void clear() { assert styledText != null; styledText.setText( new String() ); } /** * @see org.eclipse.ui.part.Page#dispose() */ public void dispose() { // Removes job listeners. console.getJob().removeBuidJobListener(jobListener); console.getJob().removeJobChangeListener(jobChangedListener); // Release some references. console = null; styledText = null; cancelJobAction = null; // Base treatment. super.dispose(); } /** * @see org.eclipse.ui.part.Page#createControl(org.eclipse.swt.widgets.Composite) */ public void createControl(Composite parent) { assert console != null; assert styledText == null; assert cancelJobAction == null; // Creates the text control. styledText = new StyledText( parent, SWT.READ_ONLY|SWT.MULTI|SWT.H_SCROLL|SWT.V_SCROLL ); styledText.setFont( JFaceResources.getTextFont() ); // Creates the cancel job action. cancelJobAction = new CancelJob( console ); // Creates job listeners; jobListener = new MyBuildJobListener(); jobChangedListener = new MyJobChangedListener(); console.getJob().addBuidJobListener(jobListener); console.getJob().addJobChangeListener(jobChangedListener); // Creates the actions IActionBars actionBars = getSite().getActionBars(); actionBars.getToolBarManager().appendToGroup( IConsoleConstants.LAUNCH_GROUP, cancelJobAction ); actionBars.getToolBarManager().appendToGroup( IConsoleConstants.LAUNCH_GROUP, new RemoveConsole(console) ); actionBars.getToolBarManager().appendToGroup( IConsoleConstants.OUTPUT_GROUP, new ClearLog(console) ); actionBars.getToolBarManager().appendToGroup( IConsoleConstants.OUTPUT_GROUP, new LockScroll(this) ); actionBars.updateActionBars(); } /** * @see org.eclipse.ui.part.Page#getControl() */ public Control getControl() { return styledText; } /** * Scrolls the console to the end of the log */ private void scroll() { assert styledText != null; if( scrollLocked == false ) { styledText.setSelection( styledText.getCharCount() ); styledText.showSelection(); } } /** * @see org.eclipse.ui.part.Page#setFocus() */ public void setFocus() { assert styledText != null; styledText.setFocus(); } /** * Updates the lock of the console scroll. * * @param locked a boolean giving the new lock state */ public void setScrollLocked( boolean locked ) { scrollLocked = locked; } /** * Updates the state of some action according to the current job's state */ private void updateActionStates() { assert cancelJobAction != null; assert console != null; BuildJob job = console.getJob(); cancelJobAction.setEnabled( job != null && job.getState() == Job.RUNNING ); } } eclox/eclox.ui/src/eclox/ui/console/action/0000755000076400007640000000000012166321431020244 5ustar willywillyeclox/eclox.ui/src/eclox/ui/console/action/RemoveConsole.java0000644000076400007640000000254212166012446023675 0ustar willywilly/******************************************************************************* * Copyright (C) 2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.console.action; import org.eclipse.jface.action.Action; import org.eclipse.ui.console.ConsolePlugin; import org.eclipse.ui.console.IConsole; import eclox.ui.Images; import eclox.ui.Plugin; import eclox.ui.console.Console; /** * Implements an action that removes a given console. * * @author gbrocker */ public class RemoveConsole extends Action { /** * the console the action is attached to */ Console console; /** * Constructor * * @param console the build console */ public RemoveConsole( Console console ) { super( "Remove", Plugin.getImageDescriptor(Images.REMOVE) ); this.console = console; setToolTipText( "Remove Doxygen Build Console" ); } public void run() { ConsolePlugin.getDefault().getConsoleManager().removeConsoles( new IConsole[] {console} ); super.run(); } } eclox/eclox.ui/src/eclox/ui/console/action/CancelJob.java0000644000076400007640000000236312166012446022736 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.console.action; import org.eclipse.jface.action.Action; import eclox.ui.Images; import eclox.ui.Plugin; import eclox.ui.console.Console; /** * Implements an action that will cancel the current build job of the console. * * @author gbrocker */ public class CancelJob extends Action { /** * the console the action is attached to */ Console console; /** * Constructor * * @param console the build console */ public CancelJob( Console console ) { super( "Terminate", Plugin.getImageDescriptor(Images.TERMINATE) ); this.console = console; setToolTipText( "Terminate Build" ); setEnabled( false ); } public void run() { console.getJob().cancel(); super.run(); } } eclox/eclox.ui/src/eclox/ui/console/action/ClearLog.java0000644000076400007640000000231312166012446022601 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.console.action; import org.eclipse.jface.action.Action; import eclox.core.doxygen.BuildJob; import eclox.ui.Images; import eclox.ui.Plugin; import eclox.ui.console.Console; public class ClearLog extends Action { /** * the console to act on */ private Console console; /** * Constructor * * @param console the console to act on */ public ClearLog( Console console ) { super( "Clear Console", Plugin.getImageDescriptor(Images.CLEAR_CONSOLE) ); this.console = console; setToolTipText( "Clear Build Log" ); } public void run() { BuildJob job = console.getJob(); if( job != null ) { job.clearLog(); } super.run(); } } eclox/eclox.ui/src/eclox/ui/console/action/LockScroll.java0000644000076400007640000000252112166012446023161 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.console.action; import org.eclipse.jface.action.Action; import eclox.ui.Images; import eclox.ui.Plugin; import eclox.ui.console.ConsolePage; /** * Implements the action that will lock the console from scrolling while output * is appended to the log. * * @author gbrocker */ public class LockScroll extends Action { /** * the console page to act on */ private ConsolePage consolePage; /** * Constructor * * @param consolePage the console to act on */ public LockScroll( ConsolePage consolePage ) { super("Scroll Lock", AS_CHECK_BOX); this.consolePage = consolePage; setImageDescriptor( Plugin.getImageDescriptor(Images.LOCK_CONSOLE) ); setToolTipText( "Scroll Lock" ); } public void run() { consolePage.setScrollLocked( isChecked() ); super.run(); } } eclox/eclox.ui/src/eclox/ui/console/Console.java0000644000076400007640000000736012166012446021245 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013 Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.console; import java.util.HashMap; import java.util.Map; import org.eclipse.ui.console.AbstractConsole; import org.eclipse.ui.console.ConsolePlugin; import org.eclipse.ui.console.IConsole; import org.eclipse.ui.console.IConsoleManager; import org.eclipse.ui.console.IConsoleView; import org.eclipse.ui.part.IPageBookViewPage; import eclox.core.doxygen.BuildJob; import eclox.core.doxygen.IBuildJobListener; /** * Implements the doxygen output console * * @author Guillaume Brocker */ public class Console extends AbstractConsole { /** * @brief Implements a build job listener. */ private class MyBuildJobListener implements IBuildJobListener { /** * @see eclox.core.doxygen.IBuildJobListener#buildJobLogCleared(eclox.core.doxygen.BuildJob) */ public void buildJobLogCleared(BuildJob job) {} /** * @see eclox.core.doxygen.IBuildJobListener#buildJobLogUpdated(eclox.core.doxygen.BuildJob, java.lang.String) */ public void buildJobLogUpdated(BuildJob job, String output) {} /** * @see eclox.core.doxygen.IBuildJobListener#buildJobRemoved(eclox.core.doxygen.BuildJob) */ public void buildJobRemoved(BuildJob job) { final BuildJob localJob = job; ConsolePlugin.getStandardDisplay().asyncExec( new Runnable() { public void run() { remove(localJob); } } ); } } private static Map consoles = new HashMap(); ///< Holds all known console instances. private BuildJob job; ///< the build job /** * Constructor * * @param job the build job whose output must be shown */ private Console(BuildJob job) { super( job.getName(), null ); this.job = job; this.job.addBuidJobListener(new MyBuildJobListener()); } /** * @see org.eclipse.ui.console.IConsole#createPage(org.eclipse.ui.console.IConsoleView) */ public IPageBookViewPage createPage(IConsoleView view) { return new ConsolePage(this); } /** * @see org.eclipse.ui.console.AbstractConsole#dispose() */ protected void dispose() { consoles.remove(job); super.dispose(); } /** * @see org.eclipse.ui.console.AbstractConsole#init() */ protected void init() { consoles.put(job, this); super.init(); } /** * Retrieves the job currently monitored by the console * * @return a build job or null if none */ public BuildJob getJob() { return job; } /** * Shows a console for the given job. * * @param job a build that needs a console to be shown */ static public void show( BuildJob job ) { // Retrieves the active workbench window and console manager. IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager(); Console console = null; if( consoles.containsKey(job) ) { console = (Console) consoles.get(job); } else { console = new Console(job); consoleManager.addConsoles( new IConsole[] {console} ); } // Shows the console view. console.activate(); } /** * Removes the console for the given build job. * * @param job a build job */ public static void remove(BuildJob job) { if( consoles.containsKey(job) ) { Console console = (Console) consoles.get(job); ConsolePlugin.getDefault().getConsoleManager().removeConsoles( new IConsole[] {console} ); } } } eclox/eclox.ui/src/eclox/ui/editor/0000755000076400007640000000000012166321432016614 5ustar willywillyeclox/eclox.ui/src/eclox/ui/editor/Location.java0000644000076400007640000000314312166012446021232 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor; import org.eclipse.ui.IMemento; import org.eclipse.ui.INavigationLocation; import org.eclipse.ui.NavigationLocation; /** * Implements the navigation location used for the doxyfile editor. * * @author Guillaume Brocker */ public class Location extends NavigationLocation { private final String PAGE_KEY = "page"; private final String SETTING_KEY = "setting"; private String page; private String setting; public Location( Editor editor ) { super( editor ); this.page = editor.getActivePageInstance().getId(); } public boolean mergeInto(INavigationLocation currentLocation) { // TODO Auto-generated method stub return false; } public void restoreLocation() { // TODO Auto-generated method stub } public void restoreState(IMemento memento) { page = memento.getString(PAGE_KEY); setting = memento.getString(SETTING_KEY); } public void saveState(IMemento memento) { memento.putString(PAGE_KEY, page); memento.putString(SETTING_KEY, setting); } public void update() { // TODO Auto-generated method stub } } eclox/eclox.ui/src/eclox/ui/editor/internal/0000755000076400007640000000000012166321432020430 5ustar willywillyeclox/eclox.ui/src/eclox/ui/editor/internal/ResourceChangeListener.java0000644000076400007640000000403512166012446025702 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.internal; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IFileEditorInput; import eclox.ui.editor.Editor; /** * Implements a resource change listener that will trigger relevant actions * on the given editor when its input gets updated. * * @author Guillaume Brocker */ public class ResourceChangeListener implements IResourceChangeListener { /** * a reference on the editor to manage */ private Editor editor; /** * Constructor * * @param editor the editor to manage */ public ResourceChangeListener( Editor editor ) { this.editor = editor; } public void resourceChanged(IResourceChangeEvent event) { IEditorInput editorInput = editor.getEditorInput(); IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput; IFile editorFile = fileEditorInput.getFile(); IResourceDelta doxyfileDelta = event.getDelta().findMember( editorFile.getFullPath() ); if( doxyfileDelta != null && doxyfileDelta.getKind() == IResourceDelta.REMOVED ) { closeEditor(); } } /** * Closes the editor. */ private void closeEditor() { editor.getSite().getShell().getDisplay().asyncExec( new Runnable() { public void run() { editor.getSite().getPage().closeEditor( editor, false ); } } ); } } eclox/eclox.ui/src/eclox/ui/editor/Page.java0000644000076400007640000000160012166012446020332 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor; import org.eclipse.ui.forms.editor.FormPage; import eclox.core.doxyfiles.Setting; public abstract class Page extends FormPage { public Page( Editor editor, String id, String title ) { super(editor, id, title); } public abstract Setting getCurrentSetting(); public abstract void setCurrentSetting( Setting setting ); } eclox/eclox.ui/src/eclox/ui/editor/Editor.java0000644000076400007640000001543312166012446020715 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor; import java.util.Iterator; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IMemento; import org.eclipse.ui.IPersistableEditor; import org.eclipse.ui.forms.editor.FormEditor; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.ISettingValueListener; import eclox.core.doxyfiles.Setting; import eclox.core.doxyfiles.io.Serializer; import eclox.ui.editor.internal.ResourceChangeListener; /** * Implements the doxyfile editor. * * @author gbrocker */ /** * @author willy * */ public class Editor extends FormEditor implements ISettingValueListener, IPersistableEditor { public final static String PROP_SETTING_DIRTY = "dirty"; ///< the name of the property attached to a dirty setting. public final static String SAVED_ACTIVE_PAGE_ID = "SavedActivePageId"; ///< Identifies the memo entry containing the identifier if the saved active page identifier. private Doxyfile doxyfile; ///< The doxyfile content. private ResourceChangeListener resourceChangeListener; ///< the resource listener that will manage the editor life-cycle private boolean dirty = false; ///< The dirty state of the editor private IMemento savedState; ///< References a saved state to restore, null otherwise. /** * @see org.eclipse.ui.forms.editor.FormEditor#addPages() */ protected void addPages() { try { addPage(new eclox.ui.editor.basic.Page(this)); addPage(new eclox.ui.editor.advanced.Page(this)); // TODO reactivate //this.addPage(new SourcePage(this)); // Restores the saved active page. String savedPageId = (savedState != null) ? savedState.getString(SAVED_ACTIVE_PAGE_ID) : null; setActivePage(savedPageId); } catch( Throwable throwable ) {} } /** * @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor) */ public void doSave( IProgressMonitor monitor ) { // Retrieves the file input. IEditorInput editorInput = this.getEditorInput(); IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput; IFile file = fileEditorInput.getFile(); try { // Commits all pending changes. commitPages(true); // Stores the doxyfile content. Serializer serializer = new Serializer( doxyfile ); file.setContents( serializer, false, true, monitor ); // Clears the dirty property set on some settings. Iterator i = doxyfile.settingIterator(); while( i.hasNext() ) { Setting setting = (Setting) i.next(); setting.removeProperty( PROP_SETTING_DIRTY ); } // Resets the dirty flag. this.dirty = false; this.firePropertyChange( IEditorPart.PROP_DIRTY ); } catch( Throwable throwable ) { MessageDialog.openError(getSite().getShell(), "Unexpected Error", throwable.toString()); } } /** * @see org.eclipse.ui.ISaveablePart#doSaveAs() */ public void doSaveAs() { // TODO implement "save as" } /** * Retrieves the doxyfile attached to the editor. * * @return a doxyfile instance */ public Doxyfile getDoxyfile() { return this.doxyfile; } /** * @see org.eclipse.ui.ISaveablePart#isSaveAsAllowed() */ public boolean isSaveAsAllowed() { // TODO implement "save as" return false; } /** * @see eclox.doxyfiles.ISettingListener#settingValueChanged(eclox.doxyfiles.Setting) */ public void settingValueChanged( Setting setting ) { // Updates the internal editor state. this.dirty = true; this.firePropertyChange( IEditorPart.PROP_DIRTY ); // Assigns a dynamic property to the setting. setting.setProperty( PROP_SETTING_DIRTY, "yes" ); } /** * @see org.eclipse.ui.IWorkbenchPart#dispose() */ public void dispose() { // Unregisters the editor from the settings Iterator i = this.doxyfile.settingIterator(); while( i.hasNext() == true ) { Setting setting = (Setting) i.next(); setting.removeSettingListener( this ); } // Un-references the doxyfile. this.doxyfile = null; // Detaches the resource change listener ResourcesPlugin.getWorkspace().removeResourceChangeListener( resourceChangeListener ); resourceChangeListener = null; // Continue... super.dispose(); } /** * @see org.eclipse.ui.ISaveablePart#isDirty() */ public boolean isDirty() { return super.isDirty() || this.dirty; } /** * @see org.eclipse.ui.IPersistableEditor#restoreState(org.eclipse.ui.IMemento) */ public void restoreState(IMemento memento) { savedState = memento; } /** * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento) */ public void saveState(IMemento memento) { memento.putString(SAVED_ACTIVE_PAGE_ID, getActivePageInstance().getId()); } /** * @see org.eclipse.ui.part.EditorPart#setInput(org.eclipse.ui.IEditorInput) */ protected void setInput(IEditorInput input) { super.setInput(input); try { IFileEditorInput fileInput = (IFileEditorInput) input; // Attaches the resource change listener resourceChangeListener = new ResourceChangeListener(this); ResourcesPlugin.getWorkspace().addResourceChangeListener( resourceChangeListener ); // Parses the doxyfile and attaches to all settings. this.doxyfile = new Doxyfile( fileInput.getFile() ); Iterator i = this.doxyfile.settingIterator(); while( i.hasNext() == true ) { Setting setting = (Setting) i.next(); setting.addSettingListener( this ); } // Continue initialization. setPartName( input.getName() ); } catch( Throwable throwable ) { MessageDialog.openError(getSite().getShell(), "Unexpected Error", throwable.toString()); } } } eclox/eclox.ui/src/eclox/ui/editor/editors/0000755000076400007640000000000012166321432020265 5ustar willywillyeclox/eclox.ui/src/eclox/ui/editor/editors/CheckBoxEditor.java0000644000076400007640000001046412166012446023774 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; /** * @author gbrocker * */ public class CheckBoxEditor extends SettingEditor { /** * Implements a selection listener for the button */ private class MySelectionListener implements SelectionListener { public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } public void widgetSelected(SelectionEvent e) { dirty = true; fireEditorChanged(); commit(); } } private static String YES = "YES"; ///< Defines the yes setting value private static String NO = "NO"; ///< Defines the no setting value private String text; ///< the text of the check box button private Button button; ///< the check box button private boolean dirty = false; ///< the current dirty state /** * Constructor * * @param text the text to set along to the check box button */ public CheckBoxEditor( String text ) { this.text = new String(text); } /** * @see eclox.ui.editor.editors.IEditor#commit() */ public void commit() { if( hasInput() ) { getInput().setValue( getSelection() ); dirty = false; fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ public void createContent(Composite parent, FormToolkit formToolkit) { // Pre-condition assert button == null; button = formToolkit.createButton(parent, text, SWT.CHECK); button.addSelectionListener(new MySelectionListener()); parent.setLayout(new FillLayout() ); // Post-condition assert button != null; } /** * @see eclox.ui.editor.editors.IEditor#dispose() */ public void dispose() { // Pre-condition assert button != null; button.dispose(); button = null; super.dispose(); } /** * @see eclox.ui.editor.editors.IEditor#grabVerticalSpace() */ public boolean grabVerticalSpace() { return false; } /** * Retrieves the current value of the editor. * * @return the current value of the editor */ public boolean getValue() { // Pre-condition assert button != null; return button.getSelection(); } /** * @see eclox.ui.editor.editors.IEditor#isDirty() */ public boolean isDirty() { return dirty; } /** * @see eclox.ui.editor.editors.IEditor#isStale() */ public boolean isStale() { boolean result = false; if( hasInput() ) { result = getSelection().equalsIgnoreCase(getInput().getValue()) == false; } return result; } /** * @see eclox.ui.editor.editors.IEditor#refresh() */ public void refresh() { // Pre-condition assert getInput() != null; assert button != null; assert button.isDisposed() == false; if( hasInput() ) { // Updates the button state. button.setSelection( getInput().getValue().equalsIgnoreCase(YES) ); fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { // Pre-condition assert button != null; button.setEnabled(enabled); } /** * @see eclox.ui.editor.editors.IEditor#setFocus() */ public void setFocus() { // Pre-condition assert button != null; assert button.isDisposed() == false; button.setFocus(); } /** * Retrieves the current value selected in the user interface button. * * @return a string containing the selected value */ private String getSelection() { // Pre-condition assert button != null; assert button.isDisposed() == false; return button.getSelection() == true ? YES : NO; } } eclox/eclox.ui/src/eclox/ui/editor/editors/TextListEditor.java0000644000076400007640000000325612166012446024067 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.jface.dialogs.IInputValidator; import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.swt.widgets.Shell; import eclox.core.doxyfiles.Setting; /** * Implements a list editor that handle value compounds as simple text * * @author gbrocker */ public class TextListEditor extends ListEditor { /** * Implements an input validator for the input dialog used to edit value compunds. */ private class MyInputValidator implements IInputValidator { public String isValid(String newText) { if( newText.length() == 0 ) { return "Empty value is not allowed."; } else { return null; } } } protected String editValueCompound(Shell parent, Setting setting, String compound) { // Creates the edition dialog. InputDialog dialog = new InputDialog( parent, "Value Edition", "Enter the new text for the value.", Convenience.unescapeValue( compound ), new MyInputValidator() ); // Lauches the value edition if( dialog.open() == InputDialog.OK ) { return Convenience.escapeValue( dialog.getValue() ); } else { return null; } } } eclox/eclox.ui/src/eclox/ui/editor/editors/TextEditor.java0000644000076400007640000001054512166012446023232 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.forms.widgets.FormToolkit; /** * Implements a simple setting editor. * * @author gbrocker */ public class TextEditor extends SettingEditor { /** * Defines a modify listener class. */ private class TextModifyListener implements ModifyListener { /** * Tells if the listener should sleep (ignore notifications). */ public boolean sleeping = true; public void modifyText(ModifyEvent e) { if(sleeping == false) { hasChanged = true; fireEditorChanged(); commit(); } } }; /** * The text widget. */ protected Text text; /** * The current modification listener of the text control */ private TextModifyListener textModifyListener = new TextModifyListener(); /** * Remerbers if the text has changed. */ private boolean hasChanged = false; /** * @see eclox.ui.editor.editors.IEditor#commit() */ public void commit() { if( hasInput() ) { getInput().setValue( text.getText() ); hasChanged = false; fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ public void createContent( Composite parent, FormToolkit formToolkit ) { // Activates border painting. formToolkit.paintBordersFor( parent ); // Prepere the parent's layout. GridLayout layout = new GridLayout(); layout.marginTop = 0; layout.marginLeft = 0; layout.marginBottom = 0; layout.marginRight = 0; layout.marginHeight = 2; layout.marginWidth = 1; layout.horizontalSpacing = 5; parent.setLayout( layout ); // Creates the text widget. text = formToolkit.createText(parent, new String()); text.setLayoutData( new GridData(GridData.FILL_HORIZONTAL|GridData.VERTICAL_ALIGN_CENTER) ); text.addModifyListener( textModifyListener ); } /** * @see eclox.ui.editor.editors.IEditor#grabVerticalSpace() */ public boolean grabVerticalSpace() { return false; } /** * @see eclox.ui.editor.editors.IEditor#dispose() */ public void dispose() { text.dispose(); } /** * @see eclox.ui.editor.editors.IEditor#isDirty() */ public boolean isDirty() { return hasChanged; } /** * @see eclox.ui.editor.editors.IEditor#isStale() */ public boolean isStale() { boolean result = false; if( hasInput() ) { result = text.getText().equals( getInput().getValue() ) == false; } return result; } /** * @see eclox.ui.editor.editors.IEditor#refresh() */ public void refresh() { if( hasInput() ) { textModifyListener.sleeping = true; text.setText( getInput().getValue() ); hasChanged = false; textModifyListener.sleeping = false; fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { // pre-condition assert text != null; text.setEnabled(enabled); } /** * @see eclox.ui.editor.editors.IEditor#setFocus() */ public void setFocus() { text.selectAll(); text.setFocus(); } /** * @see eclox.ui.editor.editors.SettingEditor#setInput(eclox.core.doxyfiles.Setting) */ // public void setInput(Setting input) { // super.setInput(input); // // if( hasInput() ) { // textModifyListener.sleeping = true; // text.setText(input.getValue()); // textModifyListener.sleeping = false; // hasChanged = false; // } // } } eclox/eclox.ui/src/eclox/ui/editor/editors/Convenience.java0000644000076400007640000002266212166012446023376 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2006, 2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import java.io.File; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.IInputValidator; import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.FileDialog; import org.eclipse.swt.widgets.Shell; import eclox.core.doxyfiles.Doxyfile; import eclox.ui.IPreferences; import eclox.ui.Plugin; /** * Implements convenience methods for setting editors. * * @author gbrocker */ public final class Convenience { /** * Implements a specialized input dialog that adds buttons for browsing * workspace or file system for paths. */ private static class PathInputDialog extends InputDialog { /** * Implements an input validator for the input dialog used to edit value compunds. */ private static class MyInputValidator implements IInputValidator { public String isValid(String newText) { if( newText.length() == 0 ) { return "Empty value is not allowed."; } else { return null; } } } private final static int BROWSE_FILESYSTEM_FILE_ID = IDialogConstants.CLIENT_ID + 3; private final static int BROWSE_FILESYSTEM_DIRECTORY_ID = IDialogConstants.CLIENT_ID + 4; private Doxyfile doxyfile; private int styles; /** * Constructor * * @param shell the parent shell * @param doxyfile the reference doxyfile * @param initValue the initial value * @param styles a combination of browse facility flags */ public PathInputDialog( Shell shell, Doxyfile doxyfile, String initValue, int styles ) { super( shell, "Value Edition", "Edit the path. You may use buttons bellow to browse for a path.", initValue, new MyInputValidator() ); this.doxyfile = doxyfile; this.styles = styles; } protected void createButtonsForButtonBar(Composite parent) { // Create additionnal buttons. if( (styles & BROWSE_FILESYSTEM_FILE) != 0 ) { createButton( parent, BROWSE_FILESYSTEM_FILE_ID, "Browse File...", false ); } if( (styles & BROWSE_FILESYSTEM_DIRECTORY) != 0 ) { createButton( parent, BROWSE_FILESYSTEM_DIRECTORY_ID, "Browse Directory...", false ); } // Create default buttons. super.createButtonsForButtonBar(parent); } protected void buttonPressed(int buttonId) { // Retrieves the path if one of the browse buttons is pressed. String path = null; switch( buttonId ) { case BROWSE_FILESYSTEM_DIRECTORY_ID: path = Convenience.browseFileSystemForDirectory( getShell(), doxyfile, getText().getText() ); break; case BROWSE_FILESYSTEM_FILE_ID: path = Convenience.browseFileSystemForFile( getShell(), doxyfile, getText().getText() ); break; default: super.buttonPressed(buttonId); } // Updates the input text if a path has been retrieved. if( path != null ) { getText().setText( path ); } } } /** * flag that activates the facility to browse for a file system file */ public static final int BROWSE_FILESYSTEM_FILE = 1; /** * flag that activates the facility to browse for a file system directory */ public static final int BROWSE_FILESYSTEM_DIRECTORY = 2; /** * flag that activates the facility to browse for a workspace or file system path */ public static final int BROWSE_ALL = BROWSE_FILESYSTEM_FILE|BROWSE_FILESYSTEM_DIRECTORY; /** * @brief Retrieves a path from the user that will be relative to the given doxyfile. * * @param shell the parent shell * @param doxyfile the reference doxyfile * @param initPath the initial path (may relative to the given doxyfile or absolute) * @param style a combination of flags to tell which browse facilities will be available * * @return a string containing the path entered by the user or null if none */ public static String browserForPath( Shell shell, Doxyfile doxyfile, String initPath, int style ) { PathInputDialog dialog = new PathInputDialog( shell, doxyfile, initPath, style ); if( dialog.open() == PathInputDialog.OK ) { return dialog.getValue(); } else { return null; } } /** * Browses the file system for a file and retrieves a path in the file system that * may be relative to the given doxyfile's path * * @param shell a shell that will be the parent of dialogs * @param doxyfile a doxyfile that is the reference for relative paths * @param path a string containing an initial path * * @return a string containing the browsed path, or null if none */ public static String browseFileSystemForFile( Shell shell, Doxyfile doxyfile, String path ) { // Retrieves the initial path. IPath initialPath = new Path( path ); if( initialPath.isAbsolute() == false ) { initialPath = doxyfile.getFile().getParent().getLocation().append( initialPath ); } // If the initial path is not valid, use the doxyfile location as fall back. File file = new File( initialPath.toOSString() ); if( file.exists() == false ) { initialPath = doxyfile.getFile().getParent().getLocation(); } // Displays the directory dialog to the user FileDialog dialog = new FileDialog( shell ); String choosenPathString; dialog.setText( "File System File Selection" ); dialog.setFilterPath( initialPath.toOSString() ); choosenPathString = dialog.open(); // Parses the result. if( choosenPathString != null ) { IPath choosenPath = Path.fromOSString( choosenPathString ); IPath finalPath = doxyfile.makePathRelative( choosenPath ); return finalPath.toOSString(); } else { return null; } } /** * Browses the file system for a directory and retrieves a path in the file system that * may be relative to the given doxyfile's path. * * @param shell a shell that will be the parent of dialogs * @param doxyfile a doxyfile that is the reference for relative paths * @param path a string containing an initial path * * @return a string containing the browsed path, or null if none */ public static String browseFileSystemForDirectory( Shell shell, Doxyfile doxyfile, String path ) { // Retrieves the initial path. IPath initialPath = new Path( path ); if( initialPath.isAbsolute() == false ) { initialPath = doxyfile.getFile().getParent().getLocation().append( initialPath ); } // If the initial path is not valid, use the doxyfile location as fall back. File file = new File( initialPath.toOSString() ); if( file.exists() == false ) { initialPath = doxyfile.getFile().getParent().getLocation(); } // Displays the directory dialog to the user DirectoryDialog dialog = new DirectoryDialog( shell ); String choosenPathString; dialog.setText( "File System Directory Selection" ); dialog.setFilterPath( initialPath.toOSString() ); choosenPathString = dialog.open(); // Parses the result. if( choosenPathString != null ) { IPath choosenPath = Path.fromOSString( choosenPathString ); IPath finalPath = doxyfile.makePathRelative( choosenPath ); return finalPath.toOSString(); } else { return null; } } /** * Escapes the given value string. This will place back slashes before * any backslash or double quote. * * @param value the value string to escape * * @return the escaped value string * * @see unescapeValue */ public static String escapeValue( String value ) { String result = value; if( Plugin.getDefault().getPluginPreferences().getBoolean(IPreferences.HANDLE_ESCAPED_VALUES) == true ) { result = replace( result, "\\", "\\\\" ); // Replaces all \ by \\ result = replace( result, "\"", "\\\"" ); // Replaces all " by \" } return result; } /** * Un-escapes the given value string. This will remove escape backslashes * located before backslashes and double quotes. * * @param value the value string to un-escape * * @return the escaped value string * * @see escapeValue */ public static String unescapeValue( String value ) { String result = value; if( Plugin.getDefault().getPluginPreferences().getBoolean(IPreferences.HANDLE_ESCAPED_VALUES) == true ) { result = replace( result, "\\\"", "\"" ); // Replaces all \" by " result = replace( result, "\\\\", "\\" ); // Replaces all \\ by \ } return result; } /** * In the given string, replaces all matching substring by the given replacement. * * @param string the string to update * @param search the sub string to search and replace * @param replace the string to place where search matches * * @return the resulting string */ public static String replace( String string, String search, String replace ) { StringBuffer buffer = new StringBuffer( string ); for( int i = buffer.indexOf(search); i != -1; i = buffer.indexOf(search, i+replace.length()) ) { buffer = buffer.replace( i, i + search.length(), replace ); } return buffer.toString(); } } eclox/eclox.ui/src/eclox/ui/editor/editors/DirectoryEditor.java0000644000076400007640000000601012166012446024242 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; /** * Implements a setting editor that allows to browse for directories * either in the workspace or in the file system. * * @author gbrocker */ /** * @author gbrocker * */ public class DirectoryEditor extends TextEditor { /** * the push button for browsing the file system */ private Button browseFileSystemButton; /** * Implements the selection listener attached to the push buttons. */ class MySelectionListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { if( e.widget == browseFileSystemButton ) { browseFileSystem(); } } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { if( e.widget == browseFileSystemButton ) { browseFileSystem(); } } } public void createContent(Composite parent, FormToolkit formToolkit) { super.createContent(parent, formToolkit); // Create controls and their associated layout data. SelectionListener selectionListener = new MySelectionListener(); GridLayout layout = (GridLayout) parent.getLayout(); layout.numColumns = 2; browseFileSystemButton = formToolkit.createButton( parent, "Browse...", 0 ); browseFileSystemButton.addSelectionListener( selectionListener ); } /** * @see eclox.ui.editor.editors.TextEditor#dispose() */ public void dispose() { // Local cleaning. browseFileSystemButton.dispose(); // Default cleaning. super.dispose(); } /** * Browses the file system for a path and updates the managed text field. */ private void browseFileSystem() { String result; result = Convenience.browseFileSystemForDirectory( text.getShell(), getInput().getOwner(), getInput().getValue() ); if( result!= null ) { super.text.setText( result ); } } /** * @see eclox.ui.editor.editors.TextEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { assert browseFileSystemButton != null; browseFileSystemButton.setEnabled(enabled); super.setEnabled(enabled); } } eclox/eclox.ui/src/eclox/ui/editor/editors/AbstractEditor.java0000644000076400007640000000311712166012446024046 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; /** * Implements the IEditor for all listener management and notification * aspects * * @author Guillaume Brocker */ public abstract class AbstractEditor implements IEditor { /** * the registery of listeners */ private Collection listeners = new HashSet(); /** * @see eclox.ui.editor.editors.IEditor#addListener(eclox.ui.editor.editors.IEditorListener) */ public void addListener(IEditorListener listener) { listeners.add(listener); } /** * @see eclox.ui.editor.editors.IEditor#removeListener(eclox.ui.editor.editors.IEditorListener) */ public void removeListener(IEditorListener listener) { listeners.remove(listener); } /** * Notifies registered listeners that the dirty state of the editor changed. */ protected void fireEditorChanged() { Iterator i = listeners.iterator(); while( i.hasNext() ) { IEditorListener listener = (IEditorListener) i.next(); listener.editorChanged(this); } } } eclox/eclox.ui/src/eclox/ui/editor/editors/BooleanEditor.java0000644000076400007640000001464412166012446023671 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; /** * Implements an setting editor for boolean values * * @author gbrocker */ public class BooleanEditor extends SettingEditor { private static String YES = "YES"; ///< the yes selection value private static String NO = "NO"; ///< the no selection value private Button yesButton; ///< the yes button private Button noButton; ///< the no button private Button defaultButton; ///< the default button private boolean isDirty = false; ///< a boolean telling if the editor is dirty or not /** * @brief Implements a selection listener that will be attached to each button. */ private class MySelectionListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { isDirty = true; fireEditorChanged(); commit(); } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { isDirty = true; fireEditorChanged(); commit(); } } /** * @see eclox.ui.editor.editors.IEditor#commit() */ public void commit() { if( hasInput() ) { getInput().setValue(getSelection()); isDirty = false; fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ public void createContent(Composite parent, FormToolkit formToolkit) { // Initialize the parent control. RowLayout layout = new RowLayout(SWT.VERTICAL); layout.marginWidth = 0; parent.setLayout( layout ); // Creates the buttons. yesButton = formToolkit.createButton( parent, "Yes", SWT.RADIO ); noButton = formToolkit.createButton( parent, "No", SWT.RADIO ); defaultButton = formToolkit.createButton( parent, "Default", SWT.RADIO ); // Attaches a selection listener instance to each button. yesButton.addSelectionListener( new MySelectionListener() ); noButton.addSelectionListener( new MySelectionListener() ); defaultButton.addSelectionListener( new MySelectionListener() ); } /** * @see eclox.ui.editor.editors.IEditor#grabVerticalSpace() */ public boolean grabVerticalSpace() { return false; } /** * @see eclox.ui.editor.editors.IEditor#dispose() */ public void dispose() { // Pre-condition assert yesButton != null; assert noButton != null; assert defaultButton != null; // Release all resources. yesButton.dispose(); noButton.dispose(); defaultButton.dispose(); yesButton = null; noButton = null; defaultButton = null; super.dispose(); } /** * @see eclox.ui.editor.editors.IEditor#isDirty() */ public boolean isDirty() { return isDirty; } /** * @see eclox.ui.editor.editors.IEditor#isStale() */ public boolean isStale() { boolean result = false; if( hasInput() ) { result = getSelection().equalsIgnoreCase(getInput().getValue()) == false; } return result; } /** * @see eclox.ui.editor.editors.IEditor#refresh() */ public void refresh() { // Pre-condition assert yesButton != null; assert noButton != null; assert defaultButton != null; if( hasInput() ) { this.isDirty = false; String value = getInput().getValue(); yesButton.setSelection ( value.compareToIgnoreCase(YES) == 0 ); noButton.setSelection ( value.compareToIgnoreCase(NO) == 0 ); defaultButton.setSelection ( value.length() == 0 ); fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { // Pre-condition assert yesButton != null; assert noButton != null; assert defaultButton != null; yesButton.setEnabled(enabled); noButton.setEnabled(enabled); defaultButton.setEnabled(enabled); } /** * @see eclox.ui.editor.editors.IEditor#setFocus() */ public void setFocus() { // Pre-condition assert yesButton != null; assert noButton != null; assert defaultButton != null; Button selectedButton = null; if( yesButton.getSelection() == true ) { selectedButton = yesButton; } else if( noButton.getSelection() == true ) { selectedButton = noButton; } else if( defaultButton.getSelection() == true ) { selectedButton = defaultButton; } else { assert false; // What's wrong? } selectedButton.setFocus(); } /** * Retrieves the selected value from the ui controls * * @return a string containing the selected value */ private String getSelection() { // Pre-condition assert yesButton != null; assert noButton != null; assert defaultButton != null; if( yesButton.getSelection() == true ) { return new String(YES); } else if( noButton.getSelection() == true ) { return new String(NO); } else if( defaultButton.getSelection() == true ) { return new String(); } else { assert false; // What's going on ? return new String(); } } } eclox/eclox.ui/src/eclox/ui/editor/editors/IEditor.java0000644000076400007640000000474312166012446022501 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; /** * Defines the interface of doxyfile editors. * * @author gbrocker */ public interface IEditor { /** * Adds the given listener to the collectgion of listener who will be notified * when the editor gets changed. * * @param listener the listener to register * * @see removeListener */ void addListener( IEditorListener listener ); /** * Commits any changes made in the editor. */ public void commit(); /** * Creates the editor contents. * * @param parent the composite control that will contain the editor controls * @param formToolkit the form toolkit to use for the control creation */ void createContent(Composite parent, FormToolkit formToolkit); /** * Asks the editor if it wants to grow vertically to grad all available space. * * @return a boolean telling if the editor wants to grab the available vertical space */ boolean grabVerticalSpace(); /** * Asks the editor to dispose its controls. */ void dispose(); /** * Tells if the editor is dirty. * * @return true or false */ public boolean isDirty(); /** * Tells if the editor is stale, after the underlying setting has changed. * * @return true or false */ public boolean isStale(); /** * Refreshes the editor if is stale. The editor is expected to updates * its state using the data of the underlying model. */ public void refresh(); /** * Removes the given listener from the collection of registered listeners. * * @param listener the listener to un-register * * @see addListener */ public void removeListener( IEditorListener listener ); /** * Enables or disables the receiver. * * @param enabled the new enabled state */ void setEnabled(boolean enabled); /** * Makes the editor installs the focus on the right widget. */ void setFocus(); } eclox/eclox.ui/src/eclox/ui/editor/editors/IEditorListener.java0000644000076400007640000000163512166012446024204 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; /** * Defines the interface for objects that want to receive notification * about changes of an editor. * * @author Guillaume Brocker */ public interface IEditorListener { /** * Notifies the receiver that the given editor's state changed. * * @param editor the editor that changed */ void editorChanged( IEditor editor ); } eclox/eclox.ui/src/eclox/ui/editor/editors/DirectoryListEditor.java0000644000076400007640000000201112166012446025073 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.widgets.Shell; import eclox.core.doxyfiles.Setting; /** * Implements a list editor that handle value compounds as direcoty paths. * * @author gbrocker */ public class DirectoryListEditor extends ListEditor { protected String editValueCompound( Shell parent, Setting setting, String compound ) { return Convenience.browserForPath( parent, setting.getOwner(), compound, Convenience.BROWSE_FILESYSTEM_DIRECTORY ); } } eclox/eclox.ui/src/eclox/ui/editor/editors/ListEditor.java0000644000076400007640000003567112166012446023230 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Vector; import org.eclipse.jface.viewers.IOpenListener; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.ListViewer; import org.eclipse.jface.viewers.OpenEvent; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.forms.widgets.FormToolkit; import eclox.core.doxyfiles.Setting; /** * Implements a list setting editor. This class is abstract since it provides no way to * edit value compounds. See derived classes. * * @author gbrocker */ public abstract class ListEditor extends SettingEditor { /** * Implements the table viewer content provider. */ private class MyContentProvider implements IStructuredContentProvider { public Object[] getElements(Object inputElement) { Vector compounds = (Vector) inputElement; return compounds.toArray(); } public void dispose() {} public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} } /** * Implements the table viewer label provider. */ private class MyLabelProvider extends LabelProvider { public String getText(Object element) { return new String( (String)element ); } } /** * Implements an open listener that will trigger the edition of the selected list viewer item. */ private class MyOpenListener implements IOpenListener { public void open(OpenEvent event) { editSelectedValueCompound(); } } /** * Implements a button selection listener. */ private class MyButtonSelectionListener implements SelectionListener { public void widgetDefaultSelected(SelectionEvent e) { widgetSelected( e ); } public void widgetSelected(SelectionEvent e) { if( e.widget == addButton ) { addValueCompound(); } else if( e.widget == removeButton ) { removeValueCompounds(); } else if( e.widget == upButton ) { moveValueCompoundsUp(); } else if( e.widget == downButton ) { moveValueCompoundsDown(); } else { // Unsuported widget. assert false; } } } /** * Implements a selection change listener to update the button states. */ private class MySelectionChangedListener implements ISelectionChangedListener { public void selectionChanged(SelectionChangedEvent event) { updateButtons(); } } private Vector valueCompounds; ///< The collection of the setting's value compounds. private ListViewer listViewer; ///< the table viewer used to edit the managed setting private Button addButton; ///< the button allowing to trigger a new value addition private Button removeButton; ///< the button allowing to trigger the deletion of selected values private Button upButton; ///< the button allowing to move the selected values up private Button downButton; ///< the button allowing to move the selected values down /** * @see eclox.ui.editor.editors.IEditor#commit() */ public void commit() { if( hasInput() ) { getInput().setValue( valueCompounds ); fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ public void createContent(Composite parent, FormToolkit formToolkit) { // Pre-condition assert listViewer == null; // Activates border painting. formToolkit.paintBordersFor( parent ); // Installs the layout. FormLayout layout = new FormLayout(); layout.spacing = 2; parent.setLayout( layout ); // Creates the list viewer and installs it in the layout. FormData formData; listViewer = new ListViewer( parent, 0 ); formData = new FormData(); formData.top = new FormAttachment( 0, 2 ); formData.right = new FormAttachment( 85, -1 ); formData.bottom = new FormAttachment( 100, -2 ); formData.left = new FormAttachment( 0, 1 ); listViewer.getControl().setLayoutData( formData ); listViewer.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); // Initializes the list viewer. listViewer.setContentProvider( new MyContentProvider() ); listViewer.setLabelProvider( new MyLabelProvider() ); listViewer.addOpenListener( new MyOpenListener() ); // Creates various buttons and installs them in the layout. addButton = formToolkit.createButton( parent, "Add", 0 ); removeButton = formToolkit.createButton( parent, "Remove", 0 ); upButton = formToolkit.createButton( parent, "Up", 0 ); downButton = formToolkit.createButton( parent, "Down", 0 ); formData = new FormData(); formData.top = new FormAttachment( 0, 0 ); formData.right = new FormAttachment( 100, 0 ); formData.left = new FormAttachment( listViewer.getControl(), 2, SWT.RIGHT ); addButton.setLayoutData( formData ); formData = new FormData(); formData.top = new FormAttachment( addButton, 0, SWT.BOTTOM ); formData.right = new FormAttachment( 100, 0 ); formData.left = new FormAttachment( listViewer.getControl(), 2, SWT.RIGHT ); removeButton.setLayoutData( formData ); formData = new FormData(); formData.top = new FormAttachment( removeButton, 6, SWT.BOTTOM ); formData.right = new FormAttachment( 100, 0 ); formData.left = new FormAttachment( listViewer.getControl(), 2, SWT.RIGHT ); upButton.setLayoutData( formData ); formData = new FormData(); formData.top = new FormAttachment( upButton, 0, SWT.BOTTOM ); formData.right = new FormAttachment( 100, 0 ); formData.left = new FormAttachment( listViewer.getControl(), 2, SWT.RIGHT ); downButton.setLayoutData( formData ); // Assignes a selection listener to the managed buttons. MyButtonSelectionListener selectionListener = new MyButtonSelectionListener(); addButton.addSelectionListener( selectionListener ); removeButton.addSelectionListener( selectionListener ); upButton.addSelectionListener( selectionListener ); downButton.addSelectionListener( selectionListener ); // Adds a selection change listener to the list viewer and initializes the button states. listViewer.addPostSelectionChangedListener( new MySelectionChangedListener() ); updateButtons(); // Post-condition assert listViewer != null; } public boolean grabVerticalSpace() { return true; } public void dispose() { // Pre-condition assert listViewer != null; assert addButton != null; assert removeButton != null; assert upButton != null; assert downButton != null; listViewer.getControl().dispose(); listViewer = null; addButton.dispose(); addButton = null; removeButton.dispose(); removeButton = null; upButton.dispose(); upButton = null; downButton.dispose(); downButton = null; super.dispose(); // Post-condition assert listViewer == null; assert addButton == null; assert removeButton == null; assert upButton == null; assert downButton == null; } /** * @see eclox.ui.editor.editors.IEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { // Pre-condition assert listViewer != null; assert addButton != null; assert removeButton != null; assert upButton != null; assert downButton != null; listViewer.getControl().setEnabled(enabled); addButton.setEnabled(enabled); removeButton.setEnabled(enabled); upButton.setEnabled(enabled); downButton.setEnabled(enabled); } /** * @see eclox.ui.editor.editors.IEditor#setFocus() */ public void setFocus() { // Pre-condition assert listViewer != null; listViewer.getControl().setFocus(); } /** * @see eclox.ui.editor.editors.IEditor#refresh() */ public void refresh() { // Pre-condition assert listViewer != null; if( hasInput() ) { valueCompounds = new Vector(); getInput().getSplittedValue( valueCompounds ); listViewer.setInput(valueCompounds); updateButtons(); fireEditorChanged(); } } /** * @see eclox.ui.editor.editors.IEditor#isDirty() */ public boolean isDirty() { return false; } /** * @see eclox.ui.editor.editors.IEditor#isStale() */ public boolean isStale() { boolean result = false; if( hasInput() ) { Collection values = new Vector(); getInput().getSplittedValue(values); result = valueCompounds.equals(values) == false; } return result; } /** * Edits the given value compound and returns the new comound value. * Null is interpreted as a canceled edition. * * Sub classes have to implement this method to provide a dialog to the user to do * the value compund edition. * * @param parent the parent shell that implementors may use as parent window for any dialog * @param setting the setting begin edited (it is just given as information and should be edited directly) * @param compound the value compund to edit * * @return a string containing the new compund value or null */ abstract protected String editValueCompound( Shell parent, Setting setting, String compound ); /** * Adds a new value compound. */ private void addValueCompound() { // Pre-condition assert listViewer != null; assert valueCompounds != null; // Edits a new value. String newCompound = editValueCompound( listViewer.getControl().getShell(), getInput(), "new value" ); // Inserts the new compound if it has been validated. if( newCompound != null ) { valueCompounds.add( newCompound ); fireEditorChanged(); commit(); listViewer.refresh(); listViewer.setSelection( new StructuredSelection(new Integer(valueCompounds.size() -1)) ); } } /** * Edits the value compound that is selected in the list viewer. * * @return true when a compound has been modified, false otherwise */ private boolean editSelectedValueCompound() { // Pre-condition assert listViewer != null; assert valueCompounds != null; // Retrieves and handles the selection. IStructuredSelection selection = (IStructuredSelection) listViewer.getSelection(); String original = (String) selection.getFirstElement(); String edited = editValueCompound( listViewer.getControl().getShell(), getInput(), original ); // Processes the edited compound. if( edited != null ) { // Updates the setting. valueCompounds.set( valueCompounds.indexOf(original), edited ); fireEditorChanged(); // Commit changes and erstores the selection. listViewer.getControl().setRedraw( false ); commit(); listViewer.refresh(); listViewer.setSelection( new StructuredSelection(edited) ); listViewer.getControl().setRedraw( true ); // Job's done. return true; } else { return false; } } /** * Moves the value compounds corresponding to the current selection up. */ private void moveValueCompoundsUp() { // Pre-condition assert listViewer != null; assert valueCompounds != null; // Retrieves the current selection and skip if it is empty. IStructuredSelection selection = (IStructuredSelection) listViewer.getSelection(); if( selection.isEmpty() == true ) { return; } // Retrieves the list of the selected items. Vector selected = new Vector(selection.toList()); Iterator i = valueCompounds.iterator(); while( i.hasNext() == true && selected.isEmpty() == false ) { Object current = i.next(); if( current.equals(selected.get(0)) ) { int index = valueCompounds.indexOf(current); if( index > 0 ) { Collections.swap(valueCompounds, index, index-1); } else { break; } selected.remove(0); } } fireEditorChanged(); // Commits changes and reselected moved objects. listViewer.getControl().setRedraw( false ); commit(); listViewer.refresh(); listViewer.getControl().setRedraw( true ); } /** * Moves the value compounds corresponding to the current selection down. */ private void moveValueCompoundsDown() { // Pre-condition assert listViewer != null; assert valueCompounds != null; // Retrieves the current selection and skip if it is empty. IStructuredSelection selection = (IStructuredSelection) listViewer.getSelection(); if( selection.isEmpty() == true ) { return; } // Retrieves the list of the selected items. Vector selected = new Vector(selection.toList()); Collections.reverse( selected ); Collections.reverse(valueCompounds); // Retrieves the list of the selected items. Iterator i = valueCompounds.iterator(); while( i.hasNext() == true && selected.isEmpty() == false ) { Object current = i.next(); if( current.equals(selected.get(0)) ) { int index = valueCompounds.indexOf(current); if( index > 0 ) { Collections.swap(valueCompounds, index, index-1); } else { break; } selected.remove(0); } } Collections.reverse(valueCompounds); fireEditorChanged(); // Commits changes and reselected moved objects. listViewer.getControl().setRedraw( false ); commit(); listViewer.refresh(); listViewer.getControl().setRedraw( true ); } /** * Removes the selected value compounds. */ private void removeValueCompounds() { // Pre-condition assert listViewer != null; assert valueCompounds != null; // Retrieves the current selection and skip if it is empty. IStructuredSelection selection = (IStructuredSelection) listViewer.getSelection(); if( selection.isEmpty() == true ) { return; } // Removes selected items from the value compounds. valueCompounds.removeAll( selection.toList() ); fireEditorChanged(); // Commits changes. commit(); listViewer.refresh(); } /** * Updates the state of some buttons. */ private void updateButtons() { // Pre-condition assert listViewer != null; assert removeButton != null; assert upButton != null; assert downButton != null; // Retrieves the selection emptiness and updates the buttons. boolean willBeEnabled = listViewer.getSelection().isEmpty() == false; removeButton.setEnabled( willBeEnabled ); upButton.setEnabled( willBeEnabled ); downButton.setEnabled( willBeEnabled ); } } eclox/eclox.ui/src/eclox/ui/editor/editors/SettingEditor.java0000644000076400007640000000244612166012446023724 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import eclox.core.doxyfiles.Setting; public abstract class SettingEditor extends AbstractEditor { private Setting input = null; ///< References the editor's input. /** * @see eclox.ui.editor.editors.IEditor#dispose() */ public void dispose() { input = null; } /** * Retrieves the editor input. * * @return the current input of the editor */ public Setting getInput() { return input; } /** * Tells if the editor has been assigned a setting. * * @return true or false */ public boolean hasInput() { return input != null; } /** * Sets the editor input. * * @param input the new input of the editor, null if none */ public void setInput(Setting input) { this.input = input; } } eclox/eclox.ui/src/eclox/ui/editor/editors/PathListEditor.java0000644000076400007640000000177512166012446024043 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.widgets.Shell; import eclox.core.doxyfiles.Setting; /** * Implements a list editor that handle value compounds as directory path or file path. * * @author gbrocker */ public class PathListEditor extends ListEditor { protected String editValueCompound(Shell parent, Setting setting, String compound) { return Convenience.browserForPath( parent, setting.getOwner(), compound, Convenience.BROWSE_ALL ); } } eclox/eclox.ui/src/eclox/ui/editor/editors/FileEditor.java0000644000076400007640000000550612166012446023166 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.editors; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; public class FileEditor extends TextEditor { /** * the push button for browsing the file system */ private Button browseFileSystemButton; /** * Implements the selection listener attached to the push buttons. */ class MySelectionListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { if( e.widget == browseFileSystemButton ) { browseFileSystem(); } } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { if( e.widget == browseFileSystemButton ) { browseFileSystem(); } } } public void createContent(Composite parent, FormToolkit formToolkit) { super.createContent(parent, formToolkit); // Create controls and their associated layout data. SelectionListener selectionListener = new MySelectionListener(); GridLayout layout = (GridLayout) parent.getLayout(); layout.numColumns = 2; browseFileSystemButton = formToolkit.createButton( parent, "Browse...", 0 ); browseFileSystemButton.addSelectionListener( selectionListener ); } /** * @see eclox.ui.editor.editors.TextEditor#dispose() */ public void dispose() { // Local cleaning. browseFileSystemButton.dispose(); // Default cleaning. super.dispose(); } /** * Browses the file system for a path and updates the managed text field. */ private void browseFileSystem() { String result; result = Convenience.browseFileSystemForFile( text.getShell(), getInput().getOwner(), getInput().getValue() ); if( result!= null ) { super.text.setText( result ); } } /** * @see eclox.ui.editor.editors.TextEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { assert browseFileSystemButton != null; browseFileSystemButton.setEnabled(enabled); super.setEnabled(enabled); } } eclox/eclox.ui/src/eclox/ui/editor/advanced/0000755000076400007640000000000012166321431020360 5ustar willywillyeclox/eclox.ui/src/eclox/ui/editor/advanced/filters/0000755000076400007640000000000012166321431022030 5ustar willywillyeclox/eclox.ui/src/eclox/ui/editor/advanced/filters/All.java0000644000076400007640000000361112166012446023407 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced.filters; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IManagedForm; import eclox.core.doxyfiles.Doxyfile; /** * Implements a setting filter that shows all settings. * * @author gbrocker */ public class All implements IFilter { /** * @see eclox.ui.editor.advanced.filters.IFilter#setDoxyfile(eclox.doxyfiles.Doxyfile) */ public void setDoxyfile(Doxyfile doxyfile) {} /** * @see eclox.ui.editor.advanced.filters.IFilter#createControls(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite) */ public void createControls(IManagedForm managedForm, Composite parent) {} /** * @see eclox.ui.editor.advanced.filters.IFilter#createViewerFilters(org.eclipse.jface.viewers.StructuredViewer) */ public void createViewerFilters(StructuredViewer viewer) {} /** * @see eclox.ui.editor.advanced.filters.IFilter#disposeControls() */ public void disposeControls() {} /** * @see eclox.ui.editor.advanced.filters.IFilter#disposeViewerFilers(org.eclipse.jface.viewers.StructuredViewer) */ public void disposeViewerFilers(StructuredViewer viewer) {} /** * @see eclox.ui.editor.advanced.filters.IFilter#getName() */ public String getName() { return "All"; } } eclox/eclox.ui/src/eclox/ui/editor/advanced/filters/IFilter.java0000644000076400007640000000412512166012446024236 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013 Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced.filters; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IManagedForm; import eclox.core.doxyfiles.Doxyfile; /** * Defines the interface for setting filters. * * @author gbrocker */ public interface IFilter { /** * Tells the filter which doxyfile is to filter. * * @param doxyfile a doxyfile instance */ void setDoxyfile( Doxyfile doxyfile ); /** * Asks the filter to create its user interface controls. * * @param managedForm a managed form to use for the widget creation * @param parent a composite being the parent of all widgets */ void createControls( IManagedForm managedForm, Composite parent ); /** * Asks the filter to create viewer filter and add them in a given viewer * * @param viewer a viewer where filter must be added */ void createViewerFilters( StructuredViewer viewer ); /** * Asks the filter to dispose its controls. */ void disposeControls(); /** * Asks the filter to dispose created viewer filter given a viewer * * @param viewer a structured view from which created viewer filter must be removed */ void disposeViewerFilers( StructuredViewer viewer ); /** * Retrieves the filter name. * * This name must by human readable sinci it is used in the graphical * user interface. * * @return a string containing the filter name */ String getName(); } eclox/eclox.ui/src/eclox/ui/editor/advanced/filters/Custom.java0000644000076400007640000002175012166012446024155 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced.filters; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IManagedForm; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.Setting; import eclox.ui.Images; import eclox.ui.Plugin; public class Custom implements IFilter { /** * the combo box containing the text used for the setting filtering */ private Combo combo; /** * the clear button */ private Button clearButton; /** * an array of strings containing the saved combo items */ private String[] savedComboItems = null; /** * a string containing the saved combo text */ private String savedComboText = new String(); /** * a string containing the text to use for filtering */ private String filterText; /** * the viewer being filtered */ private StructuredViewer viewer; /** * the viewer filter currently installed in the viewer to filter */ private MyViewerFiler viewerFilter; /** * Implements a timer task that will trigger the viewer refresh after * the user changed the custom filter text and update the items available * in the filter combo control. */ private class MyRunnable implements Runnable { private String referenceText; public MyRunnable( String referenceText ) { this.referenceText = new String( referenceText ); } public void run() { // Pre-condition assert combo != null; assert viewer != null; // Retrieves the combo text and checks that the user has not entered additionnal text. String comboText = combo.getText(); if( comboText.equalsIgnoreCase(referenceText) == false ) { return; } if( comboText.length() == 0 ) { combo.select( -1 ); } else { // Scans combo text items for the combo text. String comboItems[] = combo.getItems(); boolean found = false; for( int i = 0; i < comboItems.length; ++i ) { if( comboItems[i].equalsIgnoreCase(comboText) == true ) { found = true; break; } } if( found == false ) { combo.add( comboText, 0 ); } } // Refreshes the combo so the elements will be refiltered. viewer.refresh(); } }; /** * Implements a viewer filter that will search for setting matching the * string entered by the user in the combo control. */ private class MyViewerFiler extends ViewerFilter { /** * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ public boolean select(Viewer viewer, Object parentElement, Object element) { // Pre-condition assert element instanceof Setting; // Tests if the current setting matches the query string. if( filterText != null ) { Setting setting = (Setting) element; final String settingText = setting.getProperty(Setting.TEXT); return ( settingText != null ) && ( settingText.toLowerCase().indexOf(filterText.toLowerCase()) != -1 ); } else { return true; } } }; /** * Implements a combo modification listener that will trigger * the viewer refresh. */ private class MyComboModifyListener implements ModifyListener { public void modifyText(ModifyEvent e) { // Pre-condition assert combo != null; filterText = new String( combo.getText() ); combo.getDisplay().timerExec( 450, new MyRunnable(filterText) ); } }; /** * Implements a selection listsner for the managed clear button. */ private class MyClearSelectionListener implements SelectionListener { public void widgetDefaultSelected(SelectionEvent e) { // Pre-condition assert combo != null; // Clears the managed combo text. combo.select( -1 ); combo.setText( new String() ); } public void widgetSelected(SelectionEvent e) { // Pre-condition assert combo != null; // Clears the managed combo text. combo.select( -1 ); combo.setText( new String() ); } } /** * @see eclox.ui.editor.advanced.filters.IFilter#createControls(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite) */ public void createControls(IManagedForm managedForm, Composite parent) { // Pre-condition assert combo == null; assert clearButton == null; // Creates the combo control allowing the user to enter text to search. combo = new Combo( parent, SWT.FLAT|SWT.BORDER ); // Fills the combo with the eventual saved items. if( this.savedComboItems != null ) { combo.setItems( this.savedComboItems ); } else { combo.setText("type filter text"); } // Restores the saved combo selected item. combo.setText( this.savedComboText ); combo.setSelection( new Point(0,combo.getText().length()) ); // Attaches a modify listener. combo.addModifyListener( new MyComboModifyListener() ); // Creates the clear button. clearButton = managedForm.getToolkit().createButton( parent, null, SWT.FLAT ); clearButton.setImage( Plugin.getImageDescriptor( Images.ERASE ).createImage() ); clearButton.addSelectionListener( new MyClearSelectionListener() ); // Installs the layout into the parent, and layout data on controls GridLayout layout = new GridLayout( 2, false ); layout.marginTop = 0; layout.marginRight = 0; layout.marginBottom = 0; layout.marginLeft = 0; layout.marginWidth = 0; layout.marginHeight = 0; parent.setLayout( layout ); combo.setLayoutData( new GridData(GridData.FILL_BOTH|GridData.GRAB_HORIZONTAL) ); // Post-condition assert combo != null; assert clearButton != null; } /** * @see eclox.ui.editor.advanced.filters.IFilter#createViewerFilters(org.eclipse.jface.viewers.StructuredViewer) */ public void createViewerFilters(StructuredViewer viewer) { // Pre-condition assert viewer == null; assert viewerFilter == null; // Installes the viewer filter. this.viewer = viewer; this.viewerFilter = new MyViewerFiler(); this.viewer.addFilter( this.viewerFilter ); // Post-condition assert this.viewer != null; assert this.viewerFilter != null; } /** * @see eclox.ui.editor.advanced.filters.IFilter#disposeControls() */ public void disposeControls() { // Pre-condition assert combo != null; assert clearButton != null; // Saves some state of the managed combo widget. this.savedComboItems = combo.getItems(); this.savedComboText = combo.getText(); // Disposes all managed widgets. combo.dispose(); clearButton.dispose(); combo = null; clearButton = null; // Post-condition assert combo == null; assert clearButton == null; } /** * @see eclox.ui.editor.advanced.filters.IFilter#disposeViewerFilers(org.eclipse.jface.viewers.StructuredViewer) */ public void disposeViewerFilers(StructuredViewer viewer) { // Pre-condition assert this.viewer != null; assert viewerFilter != null; // Uninstalles the viewer filter. viewer.removeFilter( this.viewerFilter ); this.viewerFilter = null; this.viewer = null; // Post-condition assert this.viewer == null; assert this.viewerFilter == null; } /** * @see eclox.ui.editor.advanced.filters.IFilter#getName() */ public String getName() { return "Custom"; } /** * @see eclox.ui.editor.advanced.filters.IFilter#setDoxyfile(eclox.doxyfiles.Doxyfile) */ public void setDoxyfile(Doxyfile doxyfile) { // Nothing to do. } } eclox/eclox.ui/src/eclox/ui/editor/advanced/filters/Modified.java0000644000076400007640000001227412166012446024424 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced.filters; import java.util.Iterator; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IManagedForm; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.ISettingPropertyListener; import eclox.core.doxyfiles.Setting; import eclox.ui.editor.Editor; /** * Implements a filter that will shows only modified settings * (setting having the dirty flag). * * @author gbrocker */ public class Modified implements IFilter { /** * The structured viewer to filter. */ private StructuredViewer viewer; /** * the viewer filter installed in the managed viewer */ private MyViewerFiler viewerFilter; /** * the setting property listener instance */ private MySettingPropertyListener settingPropertyListener; /** * Implements a viewer filter that will only show * setting having the dirty property. */ private class MyViewerFiler extends ViewerFilter { public boolean select(Viewer viewer, Object parentElement, Object element) { // Pre-condition assert element instanceof Setting; Setting setting = (Setting) element; return setting.hasProperty( Editor.PROP_SETTING_DIRTY ); } public boolean isFilterProperty(Object element, String property) { if( element instanceof Setting ) { return property.equals( Editor.PROP_SETTING_DIRTY ); } else { return super.isFilterProperty(element, property); } } } /** * Implements a setting property listener that will trigger * the viewer refresh as soon as a setting dirty property changed. */ private class MySettingPropertyListener implements ISettingPropertyListener { /** * the doxyfile being listened */ private Doxyfile doxyfile; /** * Attaches the listener to the specified doxyfile. Before being * destroyed, the listener should be explicitely detached. * * @param doxyfile a doxyfile the listener will attach to * * @see detach */ public void attach( Doxyfile doxyfile ) { // Pre-condition assert this.doxyfile == null; // References the doxyfile for later use. this.doxyfile = doxyfile; // Attaches to all settings. Iterator i = doxyfile.settingIterator(); while( i.hasNext() ) { Setting setting = (Setting) i.next(); setting.addSettingListener( this ); } // Post-condition assert this.doxyfile != null; } /** * Detaches the listener from the previously attached doxyfile. * * @see attach */ public void detach() { // Pre-condition assert this.doxyfile != null; // Detaches the listener instace from all settings Iterator i = this.doxyfile.settingIterator(); while( i.hasNext() ) { Setting setting = (Setting) i.next(); setting.removeSettingListener( this ); } // Unreferences the managed doxyfile. this.doxyfile = null; // Post-condition assert this.doxyfile == null; } public void settingPropertyChanged(Setting setting, String property) { // Pre-condition assert viewer != null; viewer.update( setting, new String[]{Editor.PROP_SETTING_DIRTY} ); } public void settingPropertyRemoved(Setting setting, String property) { // Pre-condition assert viewer != null; viewer.update( setting, new String[]{Editor.PROP_SETTING_DIRTY} ); } } public void setDoxyfile(Doxyfile doxyfile) { if( doxyfile != null ) { this.settingPropertyListener = new MySettingPropertyListener(); this.settingPropertyListener.attach( doxyfile ); } else { this.settingPropertyListener.detach(); this.settingPropertyListener = null; } } public void createControls(IManagedForm managedForm, Composite parent) { // Nothing to do. } public void createViewerFilters(StructuredViewer viewer) { // Pre-condition assert this.viewer == null; assert this.viewerFilter == null; // Create relevant object instances. this.viewer = viewer; this.viewerFilter = new MyViewerFiler(); this.viewer.addFilter( this.viewerFilter ); // Post-condition assert this.viewer != null; assert this.viewerFilter != null; } public void disposeControls() { // Nothing to do. } public void disposeViewerFilers(StructuredViewer viewer) { // Pre-condition assert this.viewer != null; assert this.viewerFilter != null; // Remove references on out-dated objects. this.viewer.removeFilter( this.viewerFilter ); this.viewerFilter = null; this.viewer = null; // Post-condition assert this.viewer == null; assert this.viewerFilter == null; } public String getName() { return "Modified"; } } eclox/eclox.ui/src/eclox/ui/editor/advanced/filters/ByGroup.java0000644000076400007640000001470412166012446024273 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013 Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced.filters; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IManagedForm; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.Group; import eclox.core.doxyfiles.Setting; /** * Implements a filter that shows settings by groups. * * @author gbrocker */ public class ByGroup implements IFilter { /** * the doxyfile being filtered */ private Doxyfile doxyfile; /** * the combo control displaying all group that are selectable by the user */ private Combo combo; /** * the saved combo selection index */ private int savedComboSelection = -1; /** * the current viewer beging filtered. */ private StructuredViewer viewer; /** * the current viewer filter that filters objects displayed in the setting viewer */ private MyViewerFilter viewerFilter; /** * Implements a selection listener for the managed combo control. */ private class MySelectionListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { // Pre-condition assert viewer != null; viewer.refresh(); } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { // Pre-condition assert viewer != null; viewer.refresh(); } } /** * Implements a structure viewer filter that will filter setting according to the * selected group */ private class MyViewerFilter extends ViewerFilter { /** * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ public boolean select(Viewer viewer, Object parentElement, Object element) { // Pre-condition assert combo != null; assert element instanceof Setting; // Retrieves the selected group name. int groupIndex = combo.getSelectionIndex(); String groupName = groupIndex >= 0 ? combo.getItem( groupIndex ) : null; // Tests if the given element is in the right group. if( groupName != null ) { Setting setting = (Setting) element; String settingGroup = setting.getProperty( Setting.GROUP ); return (settingGroup != null) ? settingGroup.equals( groupName ) : false; } else { return false; } } } /** * @see eclox.ui.editor.advanced.filters.IFilter#setDoxyfile(eclox.doxyfiles.Doxyfile) */ public void setDoxyfile(Doxyfile doxyfile) { this.doxyfile = doxyfile; } /** * @see eclox.ui.editor.advanced.filters.IFilter#createControls(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite) */ public void createControls( IManagedForm managedForm, Composite parent ) { // Pre-condition assert combo == null; assert doxyfile != null; // Creates the managed combo control. combo = new Combo( parent, SWT.FLAT|SWT.BORDER|SWT.READ_ONLY ); combo.addSelectionListener( new MySelectionListener() ); parent.setLayout( new FillLayout() ); // Fills the combo with group names. Object[] objects = doxyfile.getGroups(); int i; for( i = 0; i < objects.length; ++i ) { Group group = (Group) objects[i]; combo.add( group.getName() ); } // Restores the combo selection. combo.select( savedComboSelection ); // Post-condition assert combo != null; } /** * @see eclox.ui.editor.advanced.filters.IFilter#createViewerFilters(org.eclipse.jface.viewers.StructuredViewer) */ public void createViewerFilters(StructuredViewer viewer) { // Pre-condition assert this.viewerFilter == null; assert this.viewer == null; // Creates the viewer filter. this.viewerFilter = new MyViewerFilter(); this.viewer = viewer; this.viewer.addFilter( viewerFilter ); // Post-condition assert this.viewerFilter != null; assert this.viewer == viewer; } /** * @see eclox.ui.editor.advanced.filters.IFilter#disposeControls() */ public void disposeControls() { // Pre-condition assert combo != null; // Saves the combo selection. savedComboSelection = combo.getSelectionIndex(); // Diposes the managed combo control. combo.getParent().setLayout( null ); combo.dispose(); combo = null; // Post-condition assert combo == null; } /** * @see eclox.ui.editor.advanced.filters.IFilter#disposeViewerFilers(org.eclipse.jface.viewers.StructuredViewer) */ public void disposeViewerFilers(StructuredViewer viewer) { // Pre-condition assert this.viewerFilter != null; assert this.viewer == viewer; // Disposes the viewer filter. this.viewer.removeFilter( viewerFilter ); this.viewer = null; this.viewerFilter = null; // Post-condition assert this.viewerFilter == null; assert this.viewer == null; } /** * @see eclox.ui.editor.advanced.filters.IFilter#getName() */ public String getName() { return "By Group"; } } eclox/eclox.ui/src/eclox/ui/editor/advanced/NavigableSelection.java0000644000076400007640000001012212166012446024760 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced; import java.util.Iterator; import java.util.List; import java.util.Stack; import java.util.Vector; import org.eclipse.jface.viewers.IStructuredSelection; /** * Implements a selection that provides the history of all selected * items as well as the navigation among those items. * * @author gbrocker */ public class NavigableSelection implements IStructuredSelection { private Stack previousElements = new Stack(); ///< Contains all previously selected elements. private Stack nextElements = new Stack(); ///< Contains all next selected elements. private Vector elements = new Vector(); ///< References the current element of the selection. /** * @brief Builds a new selection that holds the given object. * * @param object the new object to select * * @return the new selection */ public NavigableSelection select(Object object) { NavigableSelection result; if( getFirstElement() != object ) { result = new NavigableSelection(); if( isEmpty() == false ) { result.previousElements.addAll(previousElements); result.previousElements.push(elements.firstElement()); } result.elements.add(object); } else { result = this; } return result; } /** * @brief Retrieves the collection of items that follow the current item * in the history. * * @return a stack of items */ public Stack getNextElements() { return nextElements; } /** * @brief Builds the selection that follows in the history. * * @return a selection or null if none */ public NavigableSelection getNextSelection() { NavigableSelection result = null; if( nextElements.empty() == false ) { result = new NavigableSelection(); result.previousElements.addAll(previousElements); result.previousElements.push(elements.firstElement()); result.elements.add(nextElements.peek()); result.nextElements.addAll(nextElements); result.nextElements.pop(); } return result; } /** * @brief Retrieves the collection of items that preceed the current item * in the history. * * @return a stack of items */ public Stack getPreviousElements() { return previousElements; } /** * @brief Builds the selection that preceeds in the history. * * @return a selection or null if none */ public NavigableSelection getPreviousSelection() { NavigableSelection result = null; if( previousElements.empty() == false ) { result = new NavigableSelection(); result.previousElements.addAll(previousElements); result.previousElements.pop(); result.elements.add(previousElements.peek()); result.nextElements.addAll(nextElements); result.nextElements.push(elements.firstElement()); } return result; } /** * @see org.eclipse.jface.viewers.ISelection#isEmpty() */ public boolean isEmpty() { return elements.isEmpty(); } /** * Retrieves the selected element. * * @see org.eclipse.jface.viewers.IStructuredSelection#getFirstElement() */ public Object getFirstElement() { return elements.isEmpty() ? null : elements.firstElement(); } /** * @see org.eclipse.jface.viewers.IStructuredSelection#iterator() */ public Iterator iterator() { return elements.iterator(); } /** * @see org.eclipse.jface.viewers.IStructuredSelection#size() */ public int size() { return elements.size(); } /** * @see org.eclipse.jface.viewers.IStructuredSelection#toArray() */ public Object[] toArray() { return elements.toArray(); } /** * @see org.eclipse.jface.viewers.IStructuredSelection#toList() */ public List toList() { return new Vector(elements); } } eclox/eclox.ui/src/eclox/ui/editor/advanced/DetailsPage.java0000644000076400007640000002613612166012446023420 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.FontRegistry; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IDetailsPage; import org.eclipse.ui.forms.IFormPart; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.events.HyperlinkEvent; import org.eclipse.ui.forms.events.IHyperlinkListener; import org.eclipse.ui.forms.widgets.FormText; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Section; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.Setting; import eclox.ui.Plugin; import eclox.ui.editor.editors.SettingEditor; /** * Implements the generic details node page. * * @author gbrocker */ public class DetailsPage implements IDetailsPage { /** symbolic name for emphasis font */ private static final String EMPHASIS = "em"; /** the static setting editor class register */ private static EditorClassRegister editorClassRegister = new EditorClassRegister(); /** the setting editor instance */ private SettingEditor editor; /** the section that contains all our controls */ private Section section; /** he editor content container widget */ private Composite editorContainer; /** the control containing all controls of the section */ private Composite sectionContent; /** the managed form the page is attached to */ protected IManagedForm managedForm; /** the current selection */ private NavigableSelection selection = new NavigableSelection(); /** the control displaying the setting's note text */ private FormText noteLabel; /** the font registry used for note text formatting */ private FontRegistry fontRegistry; /** * Defines the listeners that will managed activation of hyper-links in the * setting's note. */ private class MyHyperlinkListener implements IHyperlinkListener { private DetailsPage owner; /** * Constructor * * @param owner the owner of the instance */ MyHyperlinkListener( DetailsPage owner ) { this.owner = owner; } /** * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent) */ public void linkActivated(HyperlinkEvent e) { // Pre-condition assert editor != null; Doxyfile doxyfile = editor.getInput().getOwner(); Setting setting = doxyfile.getSetting( e.getHref().toString() ); if( setting != null ) { managedForm.fireSelectionChanged( owner, selection.select(setting) ); } } /** * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkEntered(org.eclipse.ui.forms.events.HyperlinkEvent) */ public void linkEntered(HyperlinkEvent e) {} /** * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkExited(org.eclipse.ui.forms.events.HyperlinkEvent) */ public void linkExited(HyperlinkEvent e) {} } /** * @see org.eclipse.ui.forms.IDetailsPage#createContents(org.eclipse.swt.widgets.Composite) */ public void createContents(Composite parent) { FormToolkit toolkit = this.managedForm.getToolkit(); fontRegistry = new FontRegistry(parent.getDisplay()); // Initializes the parent control. parent.setLayout(new FillLayout()); // Creates the section this.section = toolkit.createSection(parent, Section.TITLE_BAR); this.section.marginHeight = 5; this.section.marginWidth = 10; // Createst the section content and its layout this.sectionContent = toolkit.createComposite(section); this.section.setClient(this.sectionContent); GridLayout layout = new GridLayout(1, true); layout.marginWidth = 0; layout.marginHeight = 0; this.sectionContent.setLayout(layout); // Creates the editor content. this.editorContainer = managedForm.getToolkit().createComposite(sectionContent); this.editorContainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // Creates controls displaying the setting note. this.noteLabel = this.managedForm.getToolkit().createFormText( sectionContent, false ); this.noteLabel.setLayoutData( new GridData(GridData.FILL_HORIZONTAL) ); this.noteLabel.setFont( EMPHASIS, fontRegistry.getItalic("") ); this.noteLabel.addHyperlinkListener( new MyHyperlinkListener(this) ); } /** * @see org.eclipse.ui.forms.IFormPart#commit(boolean) */ public void commit(boolean onSave) { if( editor != null ) { editor.commit(); } } /** * @see org.eclipse.ui.forms.IFormPart#dispose() */ public void dispose() {} /** * @see org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm) */ public void initialize(IManagedForm form) { this.managedForm = form; } /** * @see org.eclipse.ui.forms.IFormPart#isDirty() */ public boolean isDirty() { return editor != null ? editor.isDirty() : false; } /** * @see org.eclipse.ui.forms.IFormPart#isStale() */ public boolean isStale() { return editor != null ? editor.isStale() : false; } /** * @see org.eclipse.ui.forms.IFormPart#refresh() */ public void refresh() { if( editor != null ) { editor.refresh(); } } /** * @see org.eclipse.ui.forms.IFormPart#setFocus() */ public void setFocus() { // Pre-condition assert this.editor != null; this.editor.setFocus(); } /** * @see org.eclipse.ui.forms.IFormPart#setFormInput(java.lang.Object) */ public boolean setFormInput(Object input) { return false; } /** * @see org.eclipse.ui.forms.IPartSelectionListener#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection) */ public void selectionChanged(IFormPart part, ISelection newSelection) { // Pre-condition assert (newSelection instanceof NavigableSelection); // Retreieves the node that is provided by the selection. /*if( part != this )*/ { selection = (NavigableSelection) newSelection; Object object = selection.getFirstElement(); Setting setting = (object instanceof Setting) ? (Setting) object : null; String text = setting.getProperty(Setting.TEXT); // Checks that the setting has a text property. if( text == null ) { Plugin.log(setting.getIdentifier() + ": missing TEXT property."); text = new String(setting.getIdentifier()); } // Updates the form controls. this.selectNote(setting); this.selectEditor(setting); this.section.setText( text ); this.section.layout(true, true); } } /** * Disposes the current editor. */ private void disposeEditor() { if(editor != null) { editor.dispose(); editor = null; } } /** * Selects the editor for the specified setting. * * @param input the setting that is the new input */ private void selectEditor(Setting input) { try { // Retrieves the editor class for the input. Class editorClass = editorClassRegister.find(input); // Perhaps should we remove the current editor. if(editor != null && editor.getClass() != editorClass) { disposeEditor(); } // Perhaps, we should create a new editor instance. if(editor == null) { editor = (SettingEditor) editorClass.newInstance(); editor.createContent(editorContainer, managedForm.getToolkit()); editorContainer.setLayoutData( new GridData(editor.grabVerticalSpace() ? GridData.FILL_BOTH : GridData.FILL_HORIZONTAL) ); } // Assigns the input to the editor. editor.setInput(input); editor.refresh(); } catch(Throwable throwable) { MessageDialog.openError(this.managedForm.getForm().getShell(), "Unexpected Error", throwable.toString()); } } /** * Updates the UI controls for the specified node. * * @param setting a setting instance to use to refresh the UI controls. */ private void selectNote(Setting setting) { // Retrieves the setting's note text. String text = setting.getProperty( Setting.NOTE ); // If there is none, build a default one. if(text == null) { text = "Not available."; } // Else do some parsing and replacements for layout and style. else { Doxyfile doxyfile = setting.getOwner(); text = text.startsWith("

") ? text : "

"+text+"

"; Matcher matcher = Pattern.compile("([A-Z_]{2,}|Warning:|Note:|@[a-z]+)").matcher(text); StringBuffer buffer = new StringBuffer(); while( matcher.find() ) { String match = matcher.group(1); if( match.equals("YES") || match.equals("NO") ) { matcher.appendReplacement( buffer, ""+match+""); } else if( match.equals("Note:") || match.equals("Warning:") ) { matcher.appendReplacement( buffer, ""+match+""); } else if( match.startsWith("@") ) { matcher.appendReplacement( buffer, ""+match+""); } else { Setting matchSetting = doxyfile.getSetting(match); if( matchSetting != null ) { String settingText = matchSetting.getProperty(Setting.TEXT); if( matchSetting == setting ) { matcher.appendReplacement( buffer, ""+settingText+""); } else { matcher.appendReplacement( buffer, ""+settingText+""); } } } } matcher.appendTail( buffer ); text = buffer.toString(); } // Finally, assignes the text to the user interface control. this.noteLabel.setText("
"+text+"
", true, false); } } eclox/eclox.ui/src/eclox/ui/editor/advanced/EditorClassRegister.java0000644000076400007640000000460512166012446025154 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced; import java.util.HashMap; import java.util.Map; import eclox.core.doxyfiles.Setting; import eclox.ui.Plugin; import eclox.ui.editor.editors.BooleanEditor; import eclox.ui.editor.editors.DirectoryEditor; import eclox.ui.editor.editors.DirectoryListEditor; import eclox.ui.editor.editors.FileEditor; import eclox.ui.editor.editors.PathListEditor; import eclox.ui.editor.editors.TextEditor; import eclox.ui.editor.editors.TextListEditor; /** * An instance of this class registers all setting editor classes by setting type. * * @author gbrocker */ public class EditorClassRegister { /** * The map registering all editor classes. */ private Map register = new HashMap(); /** * Constructor. */ public EditorClassRegister() { register.put( "file", FileEditor.class ); register.put( "directory", DirectoryEditor.class ); register.put( "text", TextEditor.class ); register.put( "boolean", BooleanEditor.class ); register.put( "text list", TextListEditor.class ); register.put( "directory list", DirectoryListEditor.class ); register.put( "path list", PathListEditor.class ); } /** * Retrieves a class for the specified setting. * * @param setting a setting for which an editor must be retrieved * * @return a setting editor class */ public Class find(Setting setting) { // Retrieves the editor class for that type String type = setting.getProperty( Setting.TYPE ); Class result = (Class) register.get(type); // Little fallback if no matching editor class was found. if(result == null) { Plugin.log(setting.getIdentifier() + ": missing or wrong TYPE property."); result = TextEditor.class; } return result; } } eclox/eclox.ui/src/eclox/ui/editor/advanced/HistoryAction.java0000644000076400007640000001325212166012446024030 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced; import java.util.Stack; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuCreator; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import eclox.core.doxyfiles.Setting; /** * Implements an action that trigger the navigation in the selection history. * This class is used to contribute to the form's action bar manager. * * @author Guillaume Brocker */ class HistoryAction extends Action { /** * Implements a menu listener used to trigger selection changes */ private class MySelectionListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { assert e.widget instanceof MenuItem; MenuItem menuItem = (MenuItem) e.widget; NavigableSelection selection = (NavigableSelection) menuItem.getData(); masterPart.setSelection(selection, true); } } /** * Implements the menu creator tha will create the menu for the action. */ private class MyMenuCreator implements IMenuCreator { private Menu menu; /** * @see org.eclipse.jface.action.IMenuCreator#dispose() */ public void dispose() { if( menu != null ) { menu.dispose(); } } /** * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control) */ public Menu getMenu(Control parent) { if( menu == null ) { menu = new Menu(parent); } fill(menu); return menu; } /** * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu) */ public Menu getMenu(Menu parent) { if( menu == null ) { menu = new Menu(parent); } fill(menu); return menu; } /** * Fills the menu with navigation history. * * @param menu the menu to full */ private void fill(Menu menu) { // Clears the menu content. MenuItem [] items = menu.getItems(); for( int i = 0; i != items.length; ++i ) { items[i].dispose(); } // Fills the menu content. NavigableSelection currentSelection = getFollowingSelection(selection); while(currentSelection != null) { Setting setting = (Setting) currentSelection.getFirstElement(); MenuItem menuItem = new MenuItem(menu, 0); menuItem.setText( setting.hasProperty(Setting.TEXT) ? setting.getProperty(Setting.TEXT) : setting.getIdentifier() ); menuItem.setData(currentSelection); menuItem.addSelectionListener(new MySelectionListener()); currentSelection = getFollowingSelection(currentSelection); } } /** * Retrieves the selection following the given one, according * to the current action's direction. * * @param selection a reference selection * * @return the following selection or null if none */ private NavigableSelection getFollowingSelection( NavigableSelection selection ) { return (direction == BACK) ? selection.getPreviousSelection() : selection.getNextSelection(); } } /** defines the back navigation direction */ public static final int BACK = 0; /** defines the forward navigation direction */ public static final int FORWARD = 1; /** the direction of the navigation assigned to the action */ private int direction; /** the master part that holds the nivation history */ private MasterPart masterPart; /** the current selection */ private NavigableSelection selection; /** * Constructor * * @param direction the navigation direction for the action * @param masterPart the master part that manage the action */ public HistoryAction(int direction, MasterPart masterPart) { super(new String(), IAction.AS_DROP_DOWN_MENU); assert masterPart != null; this.direction = direction; this.masterPart = masterPart; setMenuCreator(new MyMenuCreator()); } /** * @see org.eclipse.jface.action.Action#run() */ public void run() { switch(direction) { case BACK: masterPart.setSelection( selection.getPreviousSelection(), true ); break; case FORWARD: masterPart.setSelection( selection.getNextSelection(), true ); break; } } /** * Tells the action that the selection changed * * @param newSelection the new selection */ public void selectionChanged(ISelection newSelection) { assert newSelection instanceof NavigableSelection; selection = (NavigableSelection) newSelection; Stack sideElements = direction == BACK ? selection.getPreviousElements() : selection.getNextElements(); if( sideElements.isEmpty() ) { setEnabled(false); setText(new String()); } else { Setting setting = (Setting) sideElements.peek(); setEnabled(true); setText("Go to " + setting.getProperty(Setting.TEXT)); } } } eclox/eclox.ui/src/eclox/ui/editor/advanced/Block.java0000644000076400007640000000363012166012446022262 0ustar willywilly/* /******************************************************************************* * Copyright (C) 2003-2004, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.DetailsPart; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.MasterDetailsBlock; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.Setting; /** * @author gbrocker */ public class Block extends MasterDetailsBlock { /** * the doxyfile to edit */ private Doxyfile doxyfile; /** * Constructor * * @param doxyfile the doxyfile to edit */ Block( Doxyfile doxyfile ) { this.doxyfile = doxyfile; } /** * @see org.eclipse.ui.forms.MasterDetailsBlock#createMasterPart(org.eclipse.ui.forms.IManagedForm, org.eclipse.swt.widgets.Composite) */ protected void createMasterPart(IManagedForm managedForm, Composite parent) { managedForm.addPart( new MasterPart(parent, managedForm.getToolkit(), doxyfile) ); } /** * @see org.eclipse.ui.forms.MasterDetailsBlock#registerPages(org.eclipse.ui.forms.DetailsPart) */ protected void registerPages(DetailsPart detailsPart) { detailsPart.registerPage(Setting.class, new DetailsPage()); } /** * @see org.eclipse.ui.forms.MasterDetailsBlock#createToolBarActions(org.eclipse.ui.forms.IManagedForm) */ protected void createToolBarActions(IManagedForm managedForm) {} } eclox/eclox.ui/src/eclox/ui/editor/advanced/Page.java0000644000076400007640000000301612166012446022102 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.editor.FormPage; import eclox.ui.editor.Editor; /** * Implements the settings form page * * @author gbrocker */ public class Page extends FormPage { /** * The page identifier. */ public static final String ID = "advanced"; /** * The master/detail block. */ private Block block; /** * Constructor. * * @param editor the editor instance to attach to. * * @author gbrocker */ public Page(Editor editor) { super(editor, Page.ID, "Advanced"); block = new Block( editor.getDoxyfile() ); } /** * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm) */ protected void createFormContent(IManagedForm managedForm) { managedForm.getForm().setText(this.getTitle()); this.block.createContent(managedForm); } } eclox/eclox.ui/src/eclox/ui/editor/advanced/MasterPart.java0000644000076400007640000005145012166012446023315 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.advanced; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.LabelProviderChangedEvent; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.forms.DetailsPart; import org.eclipse.ui.forms.IFormPart; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.IPartSelectionListener; import org.eclipse.ui.forms.SectionPart; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Section; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.ISettingPropertyListener; import eclox.core.doxyfiles.Setting; import eclox.ui.editor.Editor; import eclox.ui.editor.advanced.filters.All; import eclox.ui.editor.advanced.filters.ByGroup; import eclox.ui.editor.advanced.filters.Custom; import eclox.ui.editor.advanced.filters.IFilter; import eclox.ui.editor.advanced.filters.Modified; /** * Implements the master part's user interface. * * @author gbrocker */ public class MasterPart extends SectionPart implements IPartSelectionListener { /** * Implements the master content provider. */ private class MyContentProvider implements IStructuredContentProvider { /** * @see org.eclipse.jface.viewers.IContentProvider#dispose() */ public void dispose() {} /** * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ public Object[] getElements(Object inputElement) { Doxyfile doxyfile = (Doxyfile) inputElement; return doxyfile.getSettings(); } /** * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} } /** * Implements the mouse listener attached to the table. * * This listener will search for a DetailsPart in the managed form given * at construction time and will set the focus on that part. */ private class MyDoubleClickListener implements IDoubleClickListener { /** * @see org.eclipse.jface.viewers.IDoubleClickListener#doubleClick(org.eclipse.jface.viewers.DoubleClickEvent) */ public void doubleClick(DoubleClickEvent event) { IManagedForm managedForm = getManagedForm(); // Searchs for the details part in the managed form and set the focus on it. IFormPart parts[] = managedForm.getParts(); for( int i = 0; i < parts.length; ++i ) { IFormPart currentPart = parts[i]; if( currentPart instanceof DetailsPart ) { currentPart.setFocus(); break; } } } } /** * Implements a filter button listener */ private class MyFilterButtonListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { Object data = e.widget.getData(); IFilter filter = (IFilter) data; activateFilter( filter ); } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { Object data = e.widget.getData(); IFilter filter = (IFilter) data; activateFilter( filter ); } } /** * Implements the label provider. */ private class MyLabelProvider extends LabelProvider implements ITableLabelProvider, ISettingPropertyListener { /** * the set of all settings the label provider has registered to */ private Set settings = new HashSet(); /** * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() */ public void dispose() { // Walks through all settings and unregisters from the listeners Iterator i = settings.iterator(); while( i.hasNext() == true ) { Object object = i.next(); Setting setting = (Setting) object; setting.removeSettingListener( this ); } settings.clear(); super.dispose(); } /** * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int) */ public Image getColumnImage(Object element, int columnIndex) { // We don't have any image to return. return null; } /** * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int) */ public String getColumnText(Object element, int columnIndex) { // Pre-condition assert element instanceof Setting; // Retrieves the setting's text. Setting setting = (Setting) element; // Registers as an observer of the setting setting.addSettingListener( this ); settings.add( setting ); // Determine the text to return according to the given column index. String columnText; if( columnIndex == TEXT_COLUMN ) { columnText = setting.hasProperty( Setting.TEXT ) ? setting.getProperty( Setting.TEXT ) : setting.getIdentifier(); columnText = setting.hasProperty( Editor.PROP_SETTING_DIRTY ) ? ("*").concat( columnText ) : columnText; } else if (columnIndex == VALUE_COLUMN ){ columnText = setting.getValue(); } else { columnText = null; } return columnText; } public void settingPropertyChanged(Setting setting, String property) { if( property.equals( Editor.PROP_SETTING_DIRTY ) ) { fireLabelProviderChanged( new LabelProviderChangedEvent(this, setting) ); } } public void settingPropertyRemoved(Setting setting, String property) { if( property.equals( Editor.PROP_SETTING_DIRTY ) ) { fireLabelProviderChanged( new LabelProviderChangedEvent(this, setting) ); } } } /** * Implements a tree viewer selection listener. */ private class MyTableSelectionListener implements ISelectionChangedListener { /** * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent) */ public void selectionChanged(SelectionChangedEvent event) { ISelection selection = event.getSelection(); if( selection.isEmpty() == false ) { assert selection instanceof StructuredSelection; // Updates the selection StructuredSelection structuredSelection = (StructuredSelection) selection; setSelection( currentSelection.select(structuredSelection.getFirstElement()), false ); } } } /** the text column index */ private final static int TEXT_COLUMN = 0; /** the value column index */ private final static int VALUE_COLUMN = 1; /** the doxyfile being edited */ private Doxyfile doxyfile; /** the active filter */ private IFilter activeFilter; /** the default filter */ private IFilter defaultFilter = new All(); /** the parent composite for filter buttons */ private Composite filterButtons; /** the parent composite for filter controls */ private Composite filterControls; /** the list viewer */ private TableViewer tableViewer; /** the table viewer selection listener */ private MyTableSelectionListener tableViewerSelectionListener; /** the go backward history action */ private HistoryAction goBack = new HistoryAction(HistoryAction.BACK, this); /** the go foreward history action */ private HistoryAction goForward = new HistoryAction(HistoryAction.FORWARD, this); /** the current selection */ private NavigableSelection currentSelection = new NavigableSelection(); /** * Constructor * * @param parent a composite that is the parent of all part controls * @param toolkit a toolkit used to create the part controls. * @param doxyfile a doxyfile to edit */ public MasterPart( Composite parent, FormToolkit toolkit, Doxyfile doxyfile ) { super( parent, toolkit, Section.TITLE_BAR|Section.COMPACT ); this.doxyfile = doxyfile; // Initializes the managed section. Section section = getSection(); section.setText("Settings"); section.marginHeight = 5; section.marginWidth = 10; toolkit.paintBordersFor( section ); // Creates the main section container. Composite rootContainer = toolkit.createComposite( section ); section.setClient( rootContainer ); rootContainer.setLayout( new FormLayout() ); // Continues with other initializations. createFilterButtons( toolkit, rootContainer ); createSubControls( toolkit, rootContainer ); // Adds some filters. addFilter( toolkit, defaultFilter ); addFilter( toolkit, new ByGroup() ); addFilter( toolkit, new Custom() ); addFilter( toolkit, new Modified() ); // Activates the default filter. activateFilter( defaultFilter ); } /** * Activates the specified filter. * * @param filter a filter that must be activated */ private void activateFilter( IFilter filter ) { Section section = getSection(); // Freezes the section widget. section.setRedraw( false ); // Updates the filter button's state. Control[] controls = filterButtons.getChildren(); for( int i = 0; i < controls.length; ++i ) { Control control = controls[i]; Button button = (Button) control; button.setSelection( control.getData() == filter ); } // If there is a new filter to activate, do the activation job. if( filter != activeFilter ) { // Deactivates the previous filter. if( activeFilter != null ) { activeFilter.disposeViewerFilers( tableViewer ); activeFilter.disposeControls(); activeFilter.setDoxyfile( null ); activeFilter = null; } // Activates the new filter. activeFilter = filter; activeFilter.setDoxyfile( doxyfile ); activeFilter.createControls( getManagedForm(), filterControls ); activeFilter.createViewerFilters( tableViewer ); tableViewer.refresh(); // Adapts the size of the filter control container & relayout the section content. Object tableLayoutData = tableViewer.getTable().getLayoutData(); FormData tableFormData = (FormData) tableLayoutData; if( filterControls.getChildren().length == 0 ) { filterControls.setVisible( false ); tableFormData.top = new FormAttachment( 0, 0 ); } else { filterControls.setVisible( true ); tableFormData.top = new FormAttachment( filterControls, 6, SWT.BOTTOM ); } // Reactivates section widget. section.layout( true, true ); } // Reactivates the redrawing. section.setRedraw( true ); } /** * Adds a new filter to the master part. * * @param toolkit a toolkit to use for the widget creation * @param filter a new filter to add */ private void addFilter( FormToolkit toolkit, IFilter filter ) { Button button = toolkit.createButton( filterButtons, filter.getName(), SWT.FLAT|SWT.TOGGLE); button.setData( filter ); button.addSelectionListener( new MyFilterButtonListener() ); } /** * Creates all buttons for setting filters. * * @param toolkit the form tool to use for the control creation * @param parent a composite that will be the parent of all controls */ private void createFilterButtons( FormToolkit toolkit, Composite parent ) { // Pre-condition assert filterButtons == null; assert filterControls == null; // Creates the filter button container. FillLayout buttonContainerLayout = new FillLayout( SWT.HORIZONTAL ); filterButtons = toolkit.createComposite( parent ); buttonContainerLayout.marginWidth = 0; buttonContainerLayout.marginHeight = 0; buttonContainerLayout.spacing = 3; filterButtons.setLayout( buttonContainerLayout ); // Assignes layout data fo the filter button container. FormData buttonFormData = new FormData(); buttonFormData.top = new FormAttachment( 0, 0 ); buttonFormData.right = new FormAttachment( 100, 0 ); buttonFormData.left = new FormAttachment( 0, 0 ); filterButtons.setLayoutData( buttonFormData ); // Post-condition assert filterButtons != null; } /** * Creates controls subordinated to the filter buttons. */ private void createSubControls( FormToolkit toolkit, Composite parent ) { // Pre-condition assert filterButtons != null; assert filterControls == null; assert tableViewer == null; toolkit.paintBordersFor( parent ); // Creates the sub parent control container. Composite subParent = toolkit.createComposite( parent ); FormData subParentFormData = new FormData(); subParentFormData.top = new FormAttachment( filterButtons, 6, SWT.BOTTOM ); subParentFormData.right = new FormAttachment( 100, -2 ); subParentFormData.bottom = new FormAttachment( 100, -2 ); subParentFormData.left = new FormAttachment( 0, 1 ); subParentFormData.height = 50; subParent.setLayoutData( subParentFormData ); subParent.setLayout( new FormLayout() ); subParent.setData( FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER ); // Creates the filter control container. FormData controlFormData = new FormData(); controlFormData.top = new FormAttachment( 0, 5 ); controlFormData.right = new FormAttachment( 100, -5 ); controlFormData.left = new FormAttachment( 0, 5 ); filterControls = toolkit.createComposite( subParent ); filterControls.setLayoutData( controlFormData ); // Creates the table widget that will display all settings. Table table = new Table( subParent, SWT.V_SCROLL|SWT.FULL_SELECTION ); FormData formData = new FormData(); formData.top = new FormAttachment( filterControls, 5, SWT.BOTTOM ); formData.right = new FormAttachment( 100, 0 ); formData.bottom = new FormAttachment( 100, 0 ); formData.left = new FormAttachment( 0, 0 ); formData.height = 10; formData.width = 10; table.setLayoutData( formData ); table.setHeaderVisible( true ); // Adds some columns to the table TableColumn tableColumn; tableColumn = new TableColumn( table, SWT.LEFT, TEXT_COLUMN ); tableColumn.setText( "Name" ); tableColumn = new TableColumn( table, SWT.LEFT, VALUE_COLUMN ); tableColumn.setText( "Value" ); // Creates the table viewer. tableViewer = new TableViewer( table ); tableViewer.setContentProvider( new MyContentProvider() ); tableViewer.setLabelProvider( new MyLabelProvider() ); tableViewer.setInput( doxyfile ); // Updates the column widths. TableColumn columns[] = table.getColumns(); columns[ TEXT_COLUMN ].pack(); columns[ VALUE_COLUMN ].pack(); // Post-condition assert filterControls != null; assert tableViewer != null; } /** * @see org.eclipse.ui.forms.AbstractFormPart#initialize(org.eclipse.ui.forms.IManagedForm) */ public void initialize(IManagedForm form) { // Pre-condition assert tableViewer != null; // Installs several listeners. tableViewerSelectionListener = new MyTableSelectionListener(); tableViewer.addPostSelectionChangedListener( tableViewerSelectionListener ); tableViewer.addDoubleClickListener( new MyDoubleClickListener() ); // Installs the actions goBack.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_BACK)); goForward.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); form.getForm().getToolBarManager().add(goBack); form.getForm().getToolBarManager().add(goForward); goBack.selectionChanged(new NavigableSelection()); goForward.selectionChanged(new NavigableSelection()); // Default job done by super class. super.initialize(form); } /** * @see org.eclipse.ui.forms.AbstractFormPart#isStale() */ public boolean isStale() { // We always answer yes because it is currently not trivial // to know if the data model has changed since last refresh. return true; } /** * @see org.eclipse.ui.forms.AbstractFormPart#refresh() */ public void refresh() { tableViewer.refresh(); super.refresh(); } /** * @see org.eclipse.ui.forms.IPartSelectionListener#selectionChanged(org.eclipse.ui.forms.IFormPart, org.eclipse.jface.viewers.ISelection) */ public void selectionChanged(IFormPart part, ISelection selection) { assert selection instanceof NavigableSelection; currentSelection = (NavigableSelection) selection; // Activates the default filter. activateFilter( defaultFilter ); revealObject(currentSelection.getFirstElement()); // Updates the navigation actions. goBack.selectionChanged(selection); goForward.selectionChanged(selection); } /** * Set the new selection of the part. This will forward the selection to the form * so other parts will be notified about the selection change. * * @param selection the new selection * @param reveal tells if the selection should be revealed in the controls */ public void setSelection( NavigableSelection selection, boolean reveal ) { currentSelection = selection; // If requested, reveals the selection's first element if( reveal == true ) { revealObject(selection.getFirstElement()); } // Updates the actions goBack.selectionChanged(currentSelection); goForward.selectionChanged(currentSelection); // Notifies other parts. getManagedForm().fireSelectionChanged(this, selection); } /** * Reveals the given object into the managed table viewer by selecting it. * * @param object the object to reveal */ private void revealObject(Object object) { StructuredSelection selection = (object != null) ? new StructuredSelection(object) : new StructuredSelection(); tableViewer.removePostSelectionChangedListener(tableViewerSelectionListener); tableViewer.setSelection(selection, true); tableViewer.addPostSelectionChangedListener(tableViewerSelectionListener); } } eclox/eclox.ui/src/eclox/ui/editor/basic/0000755000076400007640000000000012166321431017674 5ustar willywillyeclox/eclox.ui/src/eclox/ui/editor/basic/OutputPart.java0000644000076400007640000001113612166012446022673 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; import eclox.core.doxyfiles.Doxyfile; import eclox.ui.editor.editors.CheckBoxEditor; import eclox.ui.editor.editors.IEditor; import eclox.ui.editor.editors.IEditorListener; public class OutputPart extends Part { /** * Implements an editor listener that will update * enabled states of some editors according to the value * of some other editors. */ private class MyEditorListener implements IEditorListener { /** * @see eclox.ui.editor.editors.IEditorListener#editorDirtyChanged(eclox.ui.editor.editors.IEditor) */ public void editorChanged(IEditor editor) { if( editor == html ) { htmlFlavour.setEnabled( ((CheckBoxEditor)editor).getValue() ); htmlSearchEngine.setEnabled( ((CheckBoxEditor)editor).getValue() ); } else if( editor == latex ) { latexFlavour.setEnabled( ((CheckBoxEditor)editor).getValue() ); } } } /** * html flavour state */ private static final String PLAIN_HTML = "plain HTML"; /** * html flavour state */ private static final String FRAME_HTML = "with frames and navigation tree"; /** * html flavour state */ private static final String CHM_HTML = "prepared for compressed HTML (.chm)"; /** * latex flavour for hyperlinked pdf state */ private static final String LATEX_HYPEDLINKED_PDF = "as itermediate format for hypedlinked PDF"; /** * latex flavour for pdf state */ private static final String LATEX_PDF = "as itermediate format for PDF"; /** * latex flavour for PostScript state */ private static final String LATEX_POSTSCRIPT = "as itermediate format for PostScript"; /** * html editor */ CheckBoxEditor html = new CheckBoxEditor("HTML"); /** * html flavour editor */ RadioMultiEditor htmlFlavour = new RadioMultiEditor( new String[] {PLAIN_HTML, FRAME_HTML, CHM_HTML} ); /** * html search engine editor */ CheckBoxEditor htmlSearchEngine = new CheckBoxEditor( "with search function (requires PHP enabled server)" ); /** * latex editor */ CheckBoxEditor latex = new CheckBoxEditor("LaTeX"); /** * latex flavour editor */ RadioMultiEditor latexFlavour = new RadioMultiEditor( new String[] {LATEX_HYPEDLINKED_PDF, LATEX_PDF, LATEX_POSTSCRIPT} ); CheckBoxEditor man = new CheckBoxEditor("Man Pages"); CheckBoxEditor rtf = new CheckBoxEditor("Rich Text Format"); CheckBoxEditor xml = new CheckBoxEditor("XML"); public OutputPart( Composite parent, FormToolkit toolkit, Doxyfile doxyfile ) { super( parent, toolkit, "Output Formats", doxyfile ); addEditor( html ); addEditor( htmlFlavour, 16 ); addEditor( htmlSearchEngine, 16 ); addEditor( latex ); addEditor( latexFlavour, 16 ); addEditor( man ); addEditor( rtf ); addEditor( xml ); if( doxyfile.hasSetting("GENERATE_HTML") ) { html.addListener(new MyEditorListener()); html.setInput( doxyfile.getSetting("GENERATE_HTML") ); htmlFlavour.addSetting(FRAME_HTML, doxyfile.getSetting("GENERATE_TREEVIEW") ); htmlFlavour.addSetting(CHM_HTML, doxyfile.getSetting("GENERATE_HTMLHELP") ); htmlSearchEngine.setInput( doxyfile.getSetting("SEARCHENGINE") ); } else { html.setEnabled(false); htmlFlavour.setEnabled(false); htmlSearchEngine.setEnabled(false); } if( doxyfile.hasSetting("GENERATE_LATEX") ) { latex.addListener(new MyEditorListener()); latex.setInput( doxyfile.getSetting("GENERATE_LATEX") ); latexFlavour.addSetting(LATEX_HYPEDLINKED_PDF, doxyfile.getSetting("PDF_HYPERLINKS") ); latexFlavour.addSetting(LATEX_HYPEDLINKED_PDF, doxyfile.getSetting("USE_PDFLATEX") ); latexFlavour.addSetting(LATEX_PDF, doxyfile.getSetting("USE_PDFLATEX") ); } else { latex.setEnabled(false); latexFlavour.setEnabled(false); } man.setInput( doxyfile.getSetting("GENERATE_MAN") ); man.setEnabled( man.hasInput() ); rtf.setInput( doxyfile.getSetting("GENERATE_RTF") ); rtf.setEnabled( rtf.hasInput() ); xml.setInput( doxyfile.getSetting("GENERATE_XML") ); xml.setEnabled( xml.hasInput() ); } } eclox/eclox.ui/src/eclox/ui/editor/basic/RadioMultiEditor.java0000644000076400007640000000624712166012446023773 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; public class RadioMultiEditor extends MultiEditor { /** * Implements the selection listener used for radio button */ private class MySelectionListener implements SelectionListener { public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } public void widgetSelected(SelectionEvent e) { Button button = (Button) e.widget; if( button.getSelection() == true ) { selectState( button.getText() ); commit(); } } } /** * an array containing all radio button representing this editor */ private Button[] buttons; /** * Constructor * * @param states an array of string representing the states of the editor */ public RadioMultiEditor( String [] states ) { super( states ); } /** * @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ public void createContent(Composite parent, FormToolkit formToolkit) { // Creates all radio buttons. buttons = new Button[states.length]; for( int i = 0; i != states.length; ++i ) { buttons[i] = formToolkit.createButton(parent, states[i].getName(), SWT.RADIO); buttons[i].addSelectionListener( new MySelectionListener() ); } // Installs the layout. parent.setLayout( new FillLayout(SWT.VERTICAL) ); } /** * @see eclox.ui.editor.editors.IEditor#dispose() */ public void dispose() { buttons = null; } /** * @see eclox.ui.editor.editors.IEditor#grabVerticalSpace() */ public boolean grabVerticalSpace() { return false; } /** * @see eclox.ui.editor.basic.MultiEditor#refresh() */ public void refresh() { // Pre-condition assert buttons != null; super.refresh(); // Refreshes managed buttons State selection = getSelectionAsState(); for( int i = 0; i != buttons.length; ++i ) { buttons[i].setSelection( selection != null && selection.getName().equals(buttons[i].getText()) ); } } /** * @see eclox.ui.editor.editors.IEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { // Pre-condition assert buttons != null; for( int i = 0; i != buttons.length; ++i ) { buttons[i].setEnabled(enabled); } } /** * @see eclox.ui.editor.editors.IEditor#setFocus() */ public void setFocus() { // Pre-condition assert buttons != null; buttons[0].setFocus(); } } eclox/eclox.ui/src/eclox/ui/editor/basic/ComboMultiEditor.java0000644000076400007640000000703412166012446023767 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; /** * Implements a multi editor that presents choices in a combo box. * * @author Guillaume Brocker */ public class ComboMultiEditor extends MultiEditor { /** * Implements a selection listener that will handle selection changes in the combo control. */ private class MySelectionListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { selectState( combo.getItem(combo.getSelectionIndex()) ); commit(); } } /** * the combo control that is the representation of the editor */ Combo combo; /** * Constructor * * @param states an array of string representing all posible states */ ComboMultiEditor( String [] states ) { super( states ); } /** * @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ public void createContent(Composite parent, FormToolkit formToolkit) { // Pre-condition assert combo != null; // Creates the combo control. combo = new Combo(parent, SWT.DROP_DOWN|SWT.READ_ONLY); combo.addSelectionListener( new MySelectionListener() ); formToolkit.adapt(combo, true, true); // Fills the combo with the state names. for( int i = 0; i != states.length; ++i ) { combo.add( states[i].getName() ); } combo.setVisibleItemCount(states.length); // Installs a layout in the parent composite parent.setLayout(new FillLayout()); } /** * @see eclox.ui.editor.editors.IEditor#dispose() */ public void dispose() { combo = null; } /** * @see eclox.ui.editor.editors.IEditor#grabVerticalSpace() */ public boolean grabVerticalSpace() { return false; } /** * @see eclox.ui.editor.basic.MultiEditor#refresh() */ public void refresh() { // Pre-condition assert combo != null; super.refresh(); // Selectes the string corresponding to the current selection State selection = getSelectionAsState(); if( selection != null ) { combo.select( combo.indexOf(selection.getName()) ); } else { combo.deselectAll(); } } /** * @see eclox.ui.editor.editors.IEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { // Pre-condition assert combo != null; combo.setEnabled(enabled); } /** * @see eclox.ui.editor.editors.IEditor#setFocus() */ public void setFocus() { // Pre-condition assert combo != null; combo.setFocus(); } } eclox/eclox.ui/src/eclox/ui/editor/basic/ModePart.java0000644000076400007640000001100512166012446022252 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; import eclox.core.doxyfiles.Doxyfile; /** * Implements the form part that provides edition of mode related settings. * * @author Guillaume Brocker */ public class ModePart extends Part { /** * state for the entities editor */ private static final String ENTITIES_DOCUMENTED = "documented entities only"; /** * state for the entities editor */ private static final String ENTITIES_ALL = "all entities"; /** * state for the optimized langage editor */ private static final String CXX = "C++"; /** * state for the optimized langage editor */ private static final String JAVA = "Java"; /** * state for the optimized langage editor */ private static final String C = "C"; /** * state for the optimized langage editor */ private static final String C_SHARP = "C#"; /** * the editor used to configure entities whose documentation will be extracted */ private RadioMultiEditor entities = new RadioMultiEditor( new String[] {ENTITIES_DOCUMENTED, ENTITIES_ALL} ); /** * the editor used to configure cross-referenced source code inclusion */ private CheckMultiEditor crossReferenced = new CheckMultiEditor( "Include cross-referenced source code in the output" ); /** * the editor used to selected the optimized ouput langage */ private RadioMultiEditor optimizedLangage = new RadioMultiEditor( new String[] {CXX, JAVA, C, C_SHARP} ); /** * Constructor * * @param parent the parent control for the part control's * @param toolkit the toolkit to use for control creation * @param doxyfile the doxyfile being edited */ public ModePart( Composite parent, FormToolkit toolkit, Doxyfile doxyfile ) { super( parent, toolkit, "Mode", doxyfile ); // Creates the content. addLabel("Select the desired extraction mode:"); addEditor(entities); addEditor(crossReferenced); addSperator(); addLabel("Optimize results for:"); addEditor( optimizedLangage ); // Initializes the editors. if( doxyfile.hasSetting("HIDE_UNDOC_MEMBERS") && doxyfile.hasSetting("HIDE_UNDOC_CLASSES") && doxyfile.hasSetting("EXTRACT_ALL") && doxyfile.hasSetting("EXTRACT_PRIVATE") && doxyfile.hasSetting("EXTRACT_STATIC") ) { entities.addSetting(ENTITIES_DOCUMENTED, doxyfile.getSetting("HIDE_UNDOC_MEMBERS") ); entities.addSetting(ENTITIES_DOCUMENTED, doxyfile.getSetting("HIDE_UNDOC_CLASSES") ); entities.addSetting(ENTITIES_ALL, doxyfile.getSetting("EXTRACT_ALL") ); entities.addSetting(ENTITIES_ALL, doxyfile.getSetting("EXTRACT_PRIVATE") ); entities.addSetting(ENTITIES_ALL, doxyfile.getSetting("EXTRACT_STATIC") ); } else { entities.setEnabled( false ); } if( doxyfile.hasSetting("SOURCE_BROWSER") && doxyfile.hasSetting("REFERENCED_BY_RELATION") && doxyfile.hasSetting("REFERENCES_RELATION") && doxyfile.hasSetting("VERBATIM_HEADERS") ) { crossReferenced.addSetting(CheckMultiEditor.SELECTED, doxyfile.getSetting("SOURCE_BROWSER") ); crossReferenced.addSetting(CheckMultiEditor.SELECTED, doxyfile.getSetting("REFERENCED_BY_RELATION") ); crossReferenced.addSetting(CheckMultiEditor.SELECTED, doxyfile.getSetting("REFERENCES_RELATION") ); crossReferenced.addSetting(CheckMultiEditor.SELECTED, doxyfile.getSetting("VERBATIM_HEADERS") ); } else { crossReferenced.setEnabled(false); } if( doxyfile.hasSetting("OPTIMIZE_OUTPUT_JAVA") && doxyfile.hasSetting("OPTIMIZE_OUTPUT_FOR_C") && doxyfile.hasSetting("OPTIMIZE_OUTPUT_JAVA") && doxyfile.hasSetting("EXTRACT_STATIC") ) { optimizedLangage.addSetting(JAVA, doxyfile.getSetting("OPTIMIZE_OUTPUT_JAVA") ); optimizedLangage.addSetting(C, doxyfile.getSetting("OPTIMIZE_OUTPUT_FOR_C") ); optimizedLangage.addSetting(C_SHARP, doxyfile.getSetting("OPTIMIZE_OUTPUT_JAVA") ); optimizedLangage.addSetting(C_SHARP, doxyfile.getSetting("EXTRACT_STATIC") ); } else { optimizedLangage.setEnabled(false); } } } eclox/eclox.ui/src/eclox/ui/editor/basic/MultiEditor.java0000644000076400007640000001325712166012446023013 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import eclox.core.doxyfiles.Setting; import eclox.ui.editor.editors.AbstractEditor; /** * Base implementation of for multi editors. * * @author Guillaume Brocker */ public abstract class MultiEditor extends AbstractEditor { /** * symbolic constant value for yes */ private static final String YES = "YES"; /** * symbolic constant value for no */ private static final String NO = "NO"; protected class State { private String name; private Set selectedSettings = new HashSet(); private Set deselectedSettings = new HashSet(); State( String name ) { this.name = name; } void addSettingToSelect( Setting setting ) { selectedSettings.add( setting ); deselectedSettings.remove( setting ); } void addSettingToDeselect( Setting setting ) { if( selectedSettings.contains(setting) == false ) { deselectedSettings.add( setting ); } } String getName() { return name; } boolean wantsSelection() { boolean wanted = true; Iterator i; // Updates the selection according to the value of settings owned by the state. i = selectedSettings.iterator(); while( i.hasNext() ) { Setting setting = (Setting) i.next(); wanted = wanted && setting.getValue().equals(YES); } // Updates the selection according to the value of settings owned by the state. i = deselectedSettings.iterator(); while( i.hasNext() ) { Setting setting = (Setting) i.next(); wanted = wanted && setting.getValue().equals(NO); } // Job's done. return wanted; } void commit() { Iterator i; i = selectedSettings.iterator(); while( i.hasNext() ) { Setting setting = (Setting) i.next(); setting.setValue(YES); } i = deselectedSettings.iterator(); while( i.hasNext() ) { Setting setting = (Setting) i.next(); setting.setValue(NO); } } } /** * the collection of managed states */ protected State [] states; /** * the state being selected */ private State selection; /** * a boolean telling if the editor is dirty */ private boolean dirty = false; /** * Creates a new multi editor instance * * @param states an array containing the name of the states to create */ public MultiEditor( String [] states ) { this.states = new State[states.length]; for( int i = 0; i != states.length; ++i ) { this.states[i] = new State(states[i]); } } /** * Adds the given setting to a given state * * @param state the name of a state * @param setting the setting to add to the given state */ public void addSetting( String state, Setting setting ) { if( setting != null ) { for( int i = 0; i != states.length; ++i ) { if( states[i].name.equals(state) ) { states[i].addSettingToSelect(setting); } else { states[i].addSettingToDeselect(setting); } } } } /** * @see eclox.ui.editor.editors.IEditor#commit() */ public void commit() { // Commits the selected state. if( selection != null ) { selection.commit(); } dirty = false; fireEditorChanged(); } /** * Retrieves the selected state of the editor * * @return a string representing the selected state, or null if none */ public String getSelection() { return (selection != null) ? selection.getName() : null; } /** * @see eclox.ui.editor.editors.IEditor#isDirty() */ public boolean isDirty() { return dirty; } /** * @see eclox.ui.editor.editors.IEditor#isStale() */ public boolean isStale() { // Looks for the state that wants the selection. State wantedSelection = null; for( int i = 0; i != states.length; ++i ) { if( states[i].wantsSelection() ) { wantedSelection = states[i]; break; } } return wantedSelection != selection; } /** * Sub-classes must call this method first, in order to refresh the current state * and then refresh the user interface controls, according to the current state. * * @see eclox.ui.editor.editors.IEditor#refresh() */ public void refresh() { selection = null; dirty = false; // Searches the states that wants to be selected for( int i = 0; i != states.length; ++i ) { if( states[i].wantsSelection() ) { selection = states[i]; break; } } fireEditorChanged(); } /** * Retrieves the selected state of the multi editor. * * @return a state or null when none */ protected State getSelectionAsState() { return selection; } /** * Retrieves the state for the given name * * @name a string containing a state name * * @return the matching state or null when none */ protected State getState( String name ) { State found = null; for( int i = 0; i != states.length; ++i ) { if( states[i].getName() .equals(name) ) { found = states[i]; break; } } return found; } /** * Selectes the given state * * @param state a string containing a state name */ protected void selectState( String state ) { State candidate = getState(state); if( candidate != null ) { selection = candidate; dirty = true; fireEditorChanged(); } } } eclox/eclox.ui/src/eclox/ui/editor/basic/Part.java0000644000076400007640000001517312166012446021457 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import java.util.Collection; import java.util.Iterator; import java.util.Vector; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.forms.IFormColors; import org.eclipse.ui.forms.SectionPart; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Section; import eclox.core.doxyfiles.Doxyfile; import eclox.ui.editor.editors.IEditor; /** * Implements a specialized part that provide convenient features * to build user interfaces and manage editor life-cycles. * * @author gbrocker */ public class Part extends SectionPart { /** * The managed collection of editors */ private Collection editors = new Vector(); /** * The content of the section control */ private Composite content; /** * The toolkit used for control creation */ private FormToolkit toolkit; /** * The accumulation of separation spaces */ private int spacer = 0; /** * the doxyfile being edited */ protected Doxyfile doxyfile; /** * Contructor * * @param parent the parent control * @param tk the toolit used to create controls * @param title the title of the part * @param doxyfile the doxyfile being edited */ public Part(Composite parent, FormToolkit tk, String title, Doxyfile doxyfile) { super( parent, tk, Section.TITLE_BAR/*|Section.EXPANDED|Section.TWISTIE*/ ); this.doxyfile = doxyfile; // Initializes the section and its client component. Section section = getSection(); GridLayout layout = new GridLayout(); toolkit = tk; content = toolkit.createComposite(section); layout.numColumns = 2; layout.marginTop = 0; layout.marginRight = 0; layout.marginBottom = 0; layout.marginLeft = 0; layout.marginHeight = 0; layout.marginWidth = 0; layout.verticalSpacing = 2; content.setLayout( layout ); section.setText(title); section.setClient(content); } /** * Adds a new label to the part * * @param text the text of the label */ protected void addLabel( String text ) { Label label = toolkit.createLabel(content, text, SWT.WRAP); GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); data.horizontalSpan = 2; data.verticalIndent = spacer; label.setLayoutData(data); spacer = 0; } /** * Adds the given editor instance to the part, with the given label. * * The editor life-cycle will get managed by the part. * * @param text a string containing a label text * @param editor an editor instance */ protected void addEditor( String text, IEditor editor ) { addEditor( text, editor, 0 ); } /** * Adds the given editor instance to the part, with the given label. * * The editor life-cycle will get managed by the part. * * @param text a string containing a label text * @param editor an editor instance * @param indent an extra margin that will be added to the left side of the editor's cell */ protected void addEditor( String text, IEditor editor, int indent ) { // Creates the controls Label label = toolkit.createLabel(content, text); Composite container = toolkit.createComposite(content); GridData labelData = new GridData(SWT.FILL, SWT.CENTER, false, false); GridData containerData = new GridData(SWT.FILL, SWT.FILL, true, false); labelData.verticalIndent = spacer; labelData.horizontalIndent = indent; labelData.grabExcessVerticalSpace = editor.grabVerticalSpace(); containerData.verticalIndent = spacer; containerData.grabExcessVerticalSpace = editor.grabVerticalSpace(); label.setLayoutData(labelData); label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE)); container.setLayoutData(containerData); editor.createContent(container, toolkit); spacer = 0; // Registers the editor editors.add(editor); } /** * Adds the given editor instance to the part * * The editor life-cycle will get managed by the part. * * @param editor an editor instance */ protected void addEditor( IEditor editor ) { addEditor( editor, 0 ); } /** * Adds the given editor instance to the part * * The editor life-cycle will get managed by the part. * * @param editor an editor instance * @param indent an extra margin that will be added to the left side of the editor's cell */ protected void addEditor( IEditor editor, int indent ) { // Create the controls Composite container = toolkit.createComposite(content); GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); data.verticalIndent = spacer; data.horizontalSpan = 2; data.horizontalIndent = indent; data.grabExcessVerticalSpace = editor.grabVerticalSpace(); editor.createContent(container, toolkit); container.setLayoutData(data); spacer = 0; // Registers the editor editors.add(editor); } /** * Adds a new separator to the part */ protected void addSperator() { spacer += 8; } /** * @see org.eclipse.ui.forms.AbstractFormPart#isDirty() */ public boolean isDirty() { boolean dirty = super.isDirty(); Iterator i = editors.iterator(); while( i.hasNext() && !dirty ) { IEditor editor = (IEditor) i.next(); dirty = editor.isDirty(); } return dirty; } /** * @see org.eclipse.ui.forms.AbstractFormPart#isStale() */ public boolean isStale() { boolean stale = super.isStale(); Iterator i = editors.iterator(); while( i.hasNext() && !stale ) { IEditor editor = (IEditor) i.next(); stale = editor.isStale(); } return stale; } /** * @see org.eclipse.ui.forms.AbstractFormPart#refresh() */ public void refresh() { super.refresh(); Iterator i = editors.iterator(); while( i.hasNext() ) { IEditor editor = (IEditor) i.next(); editor.refresh(); } } /** * @see org.eclipse.ui.forms.AbstractFormPart#commit(boolean) */ public void commit(boolean onSave) { super.commit(onSave); Iterator i = editors.iterator(); while( i.hasNext() ) { IEditor editor = (IEditor) i.next(); if( editor.isDirty() ) { editor.commit(); } } } } eclox/eclox.ui/src/eclox/ui/editor/basic/CheckMultiEditor.java0000644000076400007640000000661012166012446023744 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; /** * Implements a specialized multi editor that is represented by a check box and * provides only two states: SELECTED and DESELECTED. * * @author Guillaume Brocker */ public class CheckMultiEditor extends MultiEditor { /** * the selected state name constant */ public static final String SELECTED = "Selected"; /** * the deselected state name constant */ public static final String DESELECTED = "Deselected"; /** * Defines the selection listener for the check box button */ private class MySelectionListener implements SelectionListener { public void widgetDefaultSelected(SelectionEvent e) { widgetSelected(e); } public void widgetSelected(SelectionEvent e) { Button button = (Button) e.widget; selectState( button.getSelection() ? SELECTED : DESELECTED ); commit(); } } /** * a string containing the text to use for the check box button */ private String text; /** * the check box button that represents the editor */ private Button button; /** * Constructor * * @param text a string containing the text that will be used for the check box control */ public CheckMultiEditor( String text ) { super( new String[] {SELECTED, DESELECTED} ); this.text = text; } /** * @see eclox.ui.editor.editors.IEditor#createContent(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit) */ public void createContent(Composite parent, FormToolkit formToolkit) { button = formToolkit.createButton(parent, text, SWT.CHECK); button.addSelectionListener( new MySelectionListener() ); parent.setLayout(new FillLayout(SWT.VERTICAL)); } /** * @see eclox.ui.editor.editors.IEditor#dispose() */ public void dispose() { button = null; } /** * @see eclox.ui.editor.editors.IEditor#grabVerticalSpace() */ public boolean grabVerticalSpace() { return false; } /** * @see eclox.ui.editor.basic.MultiEditor#refresh() */ public void refresh() { // Pre-condition assert button != null; // Refreshes the states. super.refresh(); // Refreshes the check box State selection = getSelectionAsState(); button.setSelection( selection != null && selection.getName().equals(SELECTED) ); } /** * @see eclox.ui.editor.editors.IEditor#setEnabled(boolean) */ public void setEnabled(boolean enabled) { // Pre-condition assert button != null; button.setEnabled(enabled); } /** * @see eclox.ui.editor.editors.IEditor#setFocus() */ public void setFocus() { // Pre-condition assert button != null; button.setFocus(); } } eclox/eclox.ui/src/eclox/ui/editor/basic/DiagramsPart.java0000644000076400007640000001251712166012446023126 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; import eclox.core.doxyfiles.Doxyfile; import eclox.ui.editor.editors.CheckBoxEditor; import eclox.ui.editor.editors.IEditor; import eclox.ui.editor.editors.IEditorListener; /** * Implements a art that provides editors for diagram generation controlling. * * @author Guillaume Brocker */ public class DiagramsPart extends Part { /** * Implements an editor listener that will trigger enabled state updates. */ private class MyEditorListener implements IEditorListener { /** * @see eclox.ui.editor.editors.IEditorListener#editorChanged(eclox.ui.editor.editors.IEditor) */ public void editorChanged(IEditor editor) { // Pre-condition assert editor == diagrams; final String selection = diagrams.getSelection(); final boolean enabled = selection != null && selection.equals(DIAGRAM_DOT_TOOL); classGraph .setEnabled(enabled && classGraph.hasInput()); collaborationGraph.setEnabled(enabled && collaborationGraph.hasInput()); includeGraph .setEnabled(enabled && includeGraph.hasInput()); includedByGraph .setEnabled(enabled && includedByGraph.hasInput()); graphicalHierarcy .setEnabled(enabled && graphicalHierarcy.hasInput()); callGraph .setEnabled(enabled && callGraph.hasInput()); } } /** * symbolic constant for diagram activation's state */ private static final String DIAGRAM_NONE = "No diagrams"; /** * symbolic constant for diagram activation's state */ private static final String DIAGRAM_BUILT_IN = "Use built-in diagram generator"; /** * symbolic constant for diagram activation's state */ private static final String DIAGRAM_DOT_TOOL = "Use dot tool from the GraphViz package to generate:"; /** * the editor for diagram activation */ private MultiEditor diagrams = new RadioMultiEditor( new String[] {DIAGRAM_NONE, DIAGRAM_BUILT_IN, DIAGRAM_DOT_TOOL} ); /** * the editor for the dot class graph generation */ private CheckBoxEditor classGraph = new CheckBoxEditor("class diagrams"); /** * the editor for the dot collaboration graph generation */ private CheckBoxEditor collaborationGraph = new CheckBoxEditor("collaboration diagrams"); /** * the editor for the dot include graph generation */ private CheckBoxEditor includeGraph = new CheckBoxEditor("include dependency graph"); /** * the editor for the dot included by graph generation */ private CheckBoxEditor includedByGraph = new CheckBoxEditor("included by dependency graph"); /** * the editor for the dot hierarchy graph generation */ private CheckBoxEditor graphicalHierarcy = new CheckBoxEditor("overall class hierarchy"); /** * the editor for the dot call graph generation */ private CheckBoxEditor callGraph = new CheckBoxEditor("call graphs"); /** * Constructor * * @param parent the parent composite * @param toolkit the toolkit to use for control creations * @param doxyfile the doxyfile being edited */ DiagramsPart( Composite parent, FormToolkit toolkit, Doxyfile doxyfile ) { super( parent, toolkit, "Diagrams to Generate", doxyfile ); // Creates all editors. addEditor( diagrams ); addEditor( classGraph, 16 ); addEditor( collaborationGraph, 16 ); addEditor( includeGraph, 16 ); addEditor( includedByGraph, 16 ); addEditor( graphicalHierarcy, 16 ); addEditor( callGraph, 16 ); // Setup all editors. if( doxyfile.hasSetting("CLASS_DIAGRAMS") && doxyfile.hasSetting("HAVE_DOT") ) { diagrams.addListener(new MyEditorListener()); diagrams.addSetting(DIAGRAM_BUILT_IN, doxyfile.getSetting("CLASS_DIAGRAMS")); diagrams.addSetting(DIAGRAM_DOT_TOOL, doxyfile.getSetting("HAVE_DOT")); classGraph .setInput(doxyfile.getSetting("CLASS_GRAPH")); collaborationGraph.setInput(doxyfile.getSetting("COLLABORATION_GRAPH")); includeGraph .setInput(doxyfile.getSetting("INCLUDE_GRAPH")); includedByGraph .setInput(doxyfile.getSetting("INCLUDED_BY_GRAPH")); graphicalHierarcy .setInput(doxyfile.getSetting("GRAPHICAL_HIERARCHY")); callGraph .setInput(doxyfile.getSetting("CALL_GRAPH")); classGraph .setEnabled(classGraph.hasInput()); collaborationGraph.setEnabled(collaborationGraph.hasInput()); includeGraph .setEnabled(includeGraph.hasInput()); includedByGraph .setEnabled(includedByGraph.hasInput()); graphicalHierarcy .setEnabled(graphicalHierarcy.hasInput()); callGraph .setEnabled(callGraph.hasInput()); } else { diagrams .setEnabled(false); classGraph .setEnabled(false); collaborationGraph.setEnabled(false); includeGraph .setEnabled(false); includedByGraph .setEnabled(false); graphicalHierarcy .setEnabled(false); callGraph .setEnabled(false); } } } eclox/eclox.ui/src/eclox/ui/editor/basic/Page.java0000644000076400007640000000660112166012446021421 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.editor.FormPage; import org.eclipse.ui.forms.widgets.FormToolkit; import eclox.core.doxyfiles.Doxyfile; import eclox.ui.editor.Editor; /** * Implements the overview page. * * @author gbrocker */ public class Page extends FormPage { /** * The page identifier. */ public static final String ID = "basic"; /** * the doxyfile being edited */ private Doxyfile doxyfile; /** * Constructor. */ public Page(Editor editor) { super(editor, Page.ID, "Basic"); doxyfile = editor.getDoxyfile(); } /** * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm) */ protected void createFormContent(IManagedForm managedForm) { FormToolkit toolkit = managedForm.getToolkit(); Composite parent = managedForm.getForm().getBody(); managedForm.getForm().setText(this.getTitle()); // Creates all parts of the form. ProjectPart projectPart = new ProjectPart( parent, toolkit, doxyfile ); OutputPart outputPart = new OutputPart( parent, toolkit, doxyfile ); ModePart modePart = new ModePart( parent, toolkit, doxyfile ); DiagramsPart diagramsPart = new DiagramsPart( parent, toolkit, doxyfile ); managedForm.addPart(projectPart); managedForm.addPart(outputPart); managedForm.addPart(modePart); managedForm.addPart(diagramsPart); // Creates the layout. FormLayout layout = new FormLayout(); layout.marginWidth = 16; layout.marginHeight = 16; layout.spacing = 20; parent.setLayout(layout); FormData data; data = new FormData(); data.top = new FormAttachment(0); data.right = new FormAttachment(50); data.bottom = new FormAttachment(modePart.getSection(), 0, SWT.TOP); data.left = new FormAttachment(0); projectPart.getSection().setLayoutData(data); data = new FormData(); data.top = new FormAttachment(0); data.right = new FormAttachment(100); data.bottom = new FormAttachment(diagramsPart.getSection(), 0, SWT.TOP); data.left = new FormAttachment(projectPart.getSection(), 0, SWT.RIGHT); outputPart.getSection().setLayoutData(data); data = new FormData(); data.right = new FormAttachment(50); data.bottom = new FormAttachment(100); data.left = new FormAttachment(0); modePart.getSection().setLayoutData(data); data = new FormData(); data.top = new FormAttachment(outputPart.getSection(), 0, SWT.BOTTOM); data.right = new FormAttachment(100); data.left = new FormAttachment(modePart.getSection(), 0, SWT.RIGHT); diagramsPart.getSection().setLayoutData(data); super.createFormContent(managedForm); } } eclox/eclox.ui/src/eclox/ui/editor/basic/ProjectPart.java0000644000076400007640000000542012166012446023000 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor.basic; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.forms.widgets.FormToolkit; import eclox.core.doxyfiles.Doxyfile; import eclox.ui.editor.editors.CheckBoxEditor; import eclox.ui.editor.editors.DirectoryEditor; import eclox.ui.editor.editors.DirectoryListEditor; import eclox.ui.editor.editors.TextEditor; /** * Implements the part that will provide editior for the project settings. * * @author gbrocker */ public class ProjectPart extends Part { /** * the project name setting editor */ private TextEditor nameEditor = new TextEditor(); /** * the project version or identifier editor */ private TextEditor versionEditor = new TextEditor(); /** * the project input editor */ private DirectoryListEditor inputEditor = new DirectoryListEditor(); /** * the recursive scan editor */ private CheckBoxEditor recursiveEditor = new CheckBoxEditor("Scan recursively"); /** * the project output editor */ private DirectoryEditor outputEditor = new DirectoryEditor(); /** * Constructor * * @param parent the parent composite of the part content * @param toolkit the toolkit to use for control creations * @param doxyfile the doxyfile being edited */ ProjectPart( Composite parent, FormToolkit toolkit, Doxyfile doxyfile ) { super( parent, toolkit, "Project", doxyfile ); addEditor("Name:", nameEditor); addEditor("Version or Identifier:", versionEditor); addSperator(); addLabel("Input directories:"); addEditor(inputEditor); addEditor(recursiveEditor); addSperator(); addEditor("Output Directory:", outputEditor); nameEditor .setInput( doxyfile.getSetting("PROJECT_NAME") ); versionEditor .setInput( doxyfile.getSetting("PROJECT_NUMBER") ); inputEditor .setInput( doxyfile.getSetting("INPUT") ); outputEditor .setInput( doxyfile.getSetting("OUTPUT_DIRECTORY") ); recursiveEditor.setInput( doxyfile.getSetting("RECURSIVE") ); nameEditor .setEnabled( nameEditor.hasInput() ); versionEditor .setEnabled( versionEditor.hasInput() ); inputEditor .setEnabled( inputEditor.hasInput() ); outputEditor .setEnabled( outputEditor.hasInput() ); recursiveEditor.setEnabled( recursiveEditor.hasInput() ); } } eclox/eclox.ui/src/eclox/ui/editor/SourcePage.java0000644000076400007640000000173412166012446021523 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.editor; import org.eclipse.ui.forms.editor.FormPage; /** * @author gbrocker */ public class SourcePage extends FormPage { /** * Defines the source page identifer. */ public static final String ID = "source"; /** * Constructor. * * @param editor the editor instance to attach to */ public SourcePage(Editor editor) { super(editor, ID, "Sources"); } } eclox/eclox.ui/src/eclox/ui/DoxyfileSelector.java0000644000076400007640000002457312166012446021472 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2004, 2007, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.ui.dialogs.ISelectionStatusValidator; import org.eclipse.ui.model.IWorkbenchAdapter; import eclox.core.Plugin; import eclox.core.doxyfiles.ResourceCollector; /** * Allow the user to choose one doxyfile among a list. * * @author gbrocker */ public class DoxyfileSelector { /** * Implement the tree content provider for the dialog. */ private static class MyContentProvider implements ITreeContentProvider { /** * The doxyfile collection. */ private Collection m_input = null; /** * Disposes of this content provider. This is called by the viewer when it is disposed. */ public void dispose() {} /** * Notifies this content provider that the given viewer's input has been switched to a different element. */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { m_input = (Collection) newInput; } /** * Returns the child elements of the given parent element. * * @param parentElement the parent element * * @return an array of child elements */ public Object[] getChildren(Object parentElement) { Collection children = new ArrayList(); Iterator doxyfileIt = m_input.iterator(); while(doxyfileIt.hasNext()) { IFile doxyfile = (IFile) doxyfileIt.next(); if(doxyfile.getProject() == parentElement) { children.add(doxyfile); } } return children.toArray(); } /** * Returns the elements to display in the viewer when its input is set to the given element. These elements can be presented as rows in a table, items in a list, etc. The result is not modified by the viewer. * * @param inputElement the input element * * @return the array of elements to display in the viewer */ public Object[] getElements(Object inputElement) { Collection doxyfiles = (Collection) inputElement; Object[] result = null; if(doxyfiles != null) { Collection projects = new HashSet(); Iterator doxyfileIt = doxyfiles.iterator(); while(doxyfileIt.hasNext() == true) { IFile doxyfile = (IFile) doxyfileIt.next(); projects.add(doxyfile.getProject()); } result = projects.toArray(); } else { result = new Object[0]; } return result; } /** * Returns the parent for the given element, or null indicating that the parent can't be computed. * * In this case the tree-structured viewer can't expand a given node correctly if requested. * * @param element the element * * @return the parent element, or null if it has none or if the parent cannot be computed. */ public Object getParent(Object element) { Object result = null; if(element instanceof IProject) { return null; } else if(element instanceof IFile) { return ((IFile)element).getProject(); } return result; } /** * Returns whether the given element has children. * * Intended as an optimization for when the viewer does not need the actual children. Clients may be able to implement this more efficiently than getChildren. * * @param element the element * * @return true if the given element has children, and false if it has no children */ public boolean hasChildren(Object element) { return element instanceof IProject; } } /** * Implement a label provider for the doxyfile selector tree viewer. */ private static class MyLabelProvider extends LabelProvider { /** * Returns the image for the label of the given element. * The image is owned by the label provider and must not be disposed directly. * Instead, dispose the label provider when no longer needed. * * @param element the element for which to provide the label image * * @return the image used to label the element, * or null if there is no image for the given object */ public Image getImage(Object element) { // Pre-condition. assert element instanceof IResource; Image result = null; IResource resourse = (IResource) element; IWorkbenchAdapter workbenchAdapter = (IWorkbenchAdapter) resourse.getAdapter( IWorkbenchAdapter.class ); if( workbenchAdapter != null ) { result = workbenchAdapter.getImageDescriptor( element ).createImage(); } return result; } /** * The LabelProvider implementation of this ILabelProvider method returns * the element's toString string. Subclasses may override. * * @param element the element for which to provide the label text * * @return the text string used to label the element, * or null if there is no text label for the given object */ public String getText(Object element) { // Pre-condition. assert element instanceof IResource; String result = null; IResource resourse = (IResource) element; IWorkbenchAdapter workbenchAdapter = (IWorkbenchAdapter) resourse.getAdapter( IWorkbenchAdapter.class ); if( workbenchAdapter != null ) { result = workbenchAdapter.getLabel( element ); } return result; } } /** * Implement a doxyfile selection validator. */ private static class MySelectionValidator implements ISelectionStatusValidator { /** * Validates an array of elements and returns the resulting status. * * @param selection The elements to validate * * @return The resulting status */ public IStatus validate(Object[] selection) { IStatus result = null; if(selection.length == 1 && selection[0] instanceof IFile) { result = new Status( Status.OK, Plugin.getDefault().getBundle().getSymbolicName(), 0, "", null ); } else { result = new Status( Status.ERROR, Plugin.getDefault().getBundle().getSymbolicName(), 0, "You must choose a Doxyfile to build.", null); } return result; } } private boolean hadDoxyfiles = false; ///< Tells if there were doxyfiles for selection. private IFile doxyfile = null; ///< The selected doxyfile private IResource root = null; ///< The root resource that is that will be starting point for doxyfiles search. /** * @param root the root resource to search for doxyfiles, the workspace root if null */ public DoxyfileSelector( IResource rootResource ) { this.root = rootResource; } /** * Opens the selection dialog and tells if the user validated to selection. * * @return true when a selection was made, false otherwise. */ public boolean open() { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); IStructuredSelection structuredSelection = (selection != null && selection instanceof IStructuredSelection) ? (IStructuredSelection) selection : new StructuredSelection(); boolean result = false; try { ResourceCollector collector = root != null ? ResourceCollector.run(root) : ResourceCollector.run(); hadDoxyfiles = collector.isEmpty() == false; if( collector.isEmpty() == false ) { ElementTreeSelectionDialog selectionDialog = new ElementTreeSelectionDialog(shell, new MyLabelProvider(), new MyContentProvider()); selectionDialog.setAllowMultiple( false ); selectionDialog.setInput( collector.getDoxyfiles() ); selectionDialog.setValidator( new MySelectionValidator() ); selectionDialog.setEmptyListMessage( "No Doxyfile found in opened projects." ); selectionDialog.setMessage( "Select a Doxyfile:" ); selectionDialog.setTitle( "Doxyfile Selection" ); selectionDialog.setInitialSelections( structuredSelection.toArray() ); // Opens the selection dialog and save the selection. if( selectionDialog.open() == ElementTreeSelectionDialog.OK ) { doxyfile = (IFile) selectionDialog.getFirstResult(); result = true; } } } catch( Throwable t ) { eclox.ui.Plugin.log(t); } return result; } /** * Convenient method that prompts the user to select a doxyfile. * * @param root The root resource to search for doxyfiles * * @return the selected doxyfile, null otherwise */ public static IFile open( IResource root ) { DoxyfileSelector selector = new DoxyfileSelector(root); selector.open(); return selector.getDoxyfile(); } /** * @brief Asks the user for a doxyfile. * * @return a doxyfile, null if none has been choosen */ public IFile getDoxyfile() { return doxyfile; } /** * @brief Tells if there were doxyfiles for last selection. * * @return true or false */ public boolean hadDoxyfiles() { return hadDoxyfiles; } } eclox/eclox.ui/src/eclox/ui/action/0000755000076400007640000000000012166321432016603 5ustar willywillyeclox/eclox.ui/src/eclox/ui/action/BuildPopupActionDelegate.java0000644000076400007640000000700612166012446024327 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2004? 2007, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.action; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.Platform; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IObjectActionDelegate; import org.eclipse.ui.IWorkbenchPart; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.ResourceCollector; import eclox.ui.DoxyfileSelector; import eclox.ui.Plugin; /** * Implement a pop-up menu action delegate that will allow to * launch doxygen builds from resources' contextual menu. * * @author gbrocker */ public class BuildPopupActionDelegate implements IObjectActionDelegate { private IResource resource; ///< References the resource that is under the contextual menu. private IWorkbenchPart targetPart; ///< References the part where the action taks place. /** * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart) */ public void setActivePart(IAction action, IWorkbenchPart targetPart) { this.targetPart = targetPart; } /** * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ public void run(IAction action) { try { IFile doxyfile = null; // If there is a resource, it is either a doxyfile // and if not, we prompt the user to get one. if( resource != null ) { doxyfile = Doxyfile.isDoxyfile(resource) ? (IFile) resource : DoxyfileSelector.open(resource); } if( doxyfile != null ) { Plugin.getDefault().getBuildManager().build( doxyfile ); } } catch(Throwable throwable) { MessageDialog.openError(targetPart.getSite().getShell(), "Unexpected Error", throwable.toString()); } } /** * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ public void selectionChanged(IAction action, ISelection selection) { boolean enabled = false; IStructuredSelection strSelection = (IStructuredSelection) selection; try { if( strSelection.size() == 1 ) { Object object = strSelection.getFirstElement(); IResource resource = (IResource) Platform.getAdapterManager().getAdapter(object, IResource.class); this.resource = resource; if( resource != null && resource.isAccessible() ) { ResourceCollector collector = ResourceCollector.run(resource); // If there is only one collected doxyfile, then assigns that doxyfile as the current resource. this.resource = collector.getSize() == 1 ? collector.getFirst() : this.resource; // Enables the action when a doxyfile has been found. enabled = collector.isEmpty() == false; } } } catch(Throwable throwable) { MessageDialog.openError(targetPart.getSite().getShell(), "Unexpected Error", throwable.toString()); } action.setEnabled(enabled); } } eclox/eclox.ui/src/eclox/ui/action/BuildActionDelegate.java0000644000076400007640000002256012166012446023305 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2004, 2007, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.action; import org.eclipse.core.resources.IFile; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.MenuItem; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowPulldownDelegate; import org.eclipse.ui.PlatformUI; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxygen.BuildJob; import eclox.ui.DoxyfileSelector; import eclox.ui.Plugin; import eclox.ui.wizard.NewDoxyfileWizard; /** * Implement the action handling for the build action. * * @author gbrocker */ public class BuildActionDelegate implements IWorkbenchWindowPulldownDelegate { /** * Listens for the popup menu items pointing to doxyfiles to build. * * @author Guillaume Brocker */ private class MenuSelectionListener implements SelectionListener { public void widgetSelected(SelectionEvent e) { processData(e.widget.getData()); } public void widgetDefaultSelected(SelectionEvent e) { processData(e.widget.getData()); } private void processData(Object data) { boolean forceChoose = false; if(data != null && data instanceof IFile) { nextDoxyfile = (IFile) data; forceChoose = false; } else { forceChoose = true; } doRun(forceChoose); } } private Menu menu; ///< The managed contextual menu. private IFile nextDoxyfile; ///< Rembers the next doxyfile to build. private IWorkbenchWindow window; ///< Holds the reference to the workbench window where the action takes place. /** * @see org.eclipse.ui.IWorkbenchWindowPulldownDelegate#getMenu(org.eclipse.swt.widgets.Control) */ public Menu getMenu(Control parent) { disposeMenu(); this.menu = new Menu(parent); // Fill it up with the build history items. BuildJob[] buildJobs = Plugin.getDefault().getBuildManager().getRecentBuildJobs(); for( int i = buildJobs.length - 1; i >= 0; i-- ) { MenuItem menuItem = new MenuItem(this.menu, SWT.PUSH); IFile currentDoxyfile = buildJobs[i].getDoxyfile(); menuItem.addSelectionListener( new MenuSelectionListener() ); menuItem.setData( currentDoxyfile ); menuItem.setText( currentDoxyfile.getName() + " [" + currentDoxyfile.getFullPath().toString() + "]" ); } // Add some sugar in the ui if( buildJobs.length > 0 ) { new MenuItem(this.menu, SWT.SEPARATOR); } // Add the fall-back menu item to let the user choose another doxyfile. MenuItem chooseMenuItem = new MenuItem(this.menu, SWT.PUSH); chooseMenuItem.addSelectionListener(new MenuSelectionListener()); chooseMenuItem.setText("Choose Doxyfile..."); // Job's done. return this.menu; } /** * Dispose the delegate. */ public void dispose() { // Frees all resources and references. disposeMenu(); nextDoxyfile = null; window = null; } /** * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */ public void init(IWorkbenchWindow window) { this.window = window; } /** * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ public void run(IAction action) { try { doRun(false); } catch( Throwable throwable ) { MessageDialog.openError(window.getShell(), "Unexpected Error", throwable.toString()); } } /** * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) */ public void selectionChanged(IAction action, ISelection selection) { try { // Retrieve the next doxyfile to build from the current selection. nextDoxyfile = getDoxyfileFromSelection(selection); // Retrieve the next doxyfile from the current editor. if( nextDoxyfile == null ) { nextDoxyfile = getDoxyfileFromActiveEditor(window); } // If there is no next doxyfile to build and the history is not empty // set the first history element as the next doxyfile. if( nextDoxyfile == null ) { BuildJob[] buildJobs = Plugin.getDefault().getBuildManager().getRecentBuildJobs(); int buildJobsCount = buildJobs.length; if( buildJobsCount > 0 ) { nextDoxyfile = buildJobs[buildJobsCount - 1].getDoxyfile(); } } // Check the existence of the doxyfile. if( nextDoxyfile != null && nextDoxyfile.exists() == false ) { nextDoxyfile = null; } // Update the tooltip. String tooltipText = nextDoxyfile != null ? "Build " + nextDoxyfile.getFullPath().toString() : "Choose Next Doxyfile"; action.setToolTipText(tooltipText); } catch(Throwable throwable) { MessageDialog.openError(window.getShell(), "Unexpected Error", throwable.toString()); } } /** * Uses the next doxyfile specified to determine what to do. * * @param forceChoose @c true to ask the user for a doxyfile to build. */ protected void doRun(boolean forceChoose) { try { IFile doxyfile = (forceChoose == true) ? null : this.nextDoxyfile; DoxyfileSelector selector = new DoxyfileSelector(null); // If there is no next doxyfile to build, ask the user for one. if(doxyfile == null) { selector.open(); doxyfile = selector.getDoxyfile(); } // If there is no doxyfile, // we will prompt the user to create one and then edit it. if (doxyfile == null && selector.hadDoxyfiles() == false) { doxyfile = askUserToCreateDoxyfile(); } else if (doxyfile != null) { Plugin.getDefault().getBuildManager().build( doxyfile ); } } catch( Throwable throwable ) { MessageDialog.openError(window.getShell(), "Unexpected Error", throwable.toString()); } } /** * Dispose the owned menu. */ private void disposeMenu() { if(this.menu != null) { this.menu.dispose(); this.menu = null; } } /** * Retrieves a doxyfile from the active editor. * * @param window a reference to a workbench window * * @return a doxfile retrieved from the active editor input. */ private static IFile getDoxyfileFromActiveEditor( IWorkbenchWindow window ) { IFile doxyfile = null; IWorkbenchPage activePage = window.getActivePage(); IEditorPart activeEditorPart = activePage != null ? window.getActivePage().getActiveEditor() : null; if(activeEditorPart != null) { IEditorInput activeEditorInput = activeEditorPart.getEditorInput(); if(activeEditorInput instanceof IFileEditorInput) { IFileEditorInput fileEditorInput = (IFileEditorInput)activeEditorInput; IFile file = fileEditorInput.getFile(); if(Doxyfile.isDoxyfile(file) == true) { doxyfile = file; } } } return doxyfile; } /** * Retrieves a doxyfile from the specified selection. * * @return a doxyfile retrieved from the specified selection. */ private static IFile getDoxyfileFromSelection(ISelection selection) { IFile doxyfile = null; // Test if the current selection is not empty. if(selection instanceof IStructuredSelection && selection.isEmpty() == false) { IStructuredSelection structSel = (IStructuredSelection) selection; Object element = structSel.getFirstElement(); if(element != null && element instanceof IFile) { IFile fileElement = (IFile) element; if(fileElement.exists() == true && Doxyfile.isDoxyfile(fileElement) == true) { doxyfile = fileElement; } } } // Job's done. return doxyfile; } /** * Prompts the user to create a new doxyfile. * * @return a doxyfile, or null if none. */ private static IFile askUserToCreateDoxyfile() { IFile doxyfile = null; Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); boolean wantDoxyfile = MessageDialog.openQuestion(shell, "No Doxyfile Found", "No doxyfile has been found in opened projects.\n\nDo you want to create a new doxyfile now ?" ); if( wantDoxyfile ) { NewDoxyfileWizard wizard = new NewDoxyfileWizard(); ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection(); IStructuredSelection strcSelection = (selection != null && selection instanceof IStructuredSelection) ? (IStructuredSelection) selection : new StructuredSelection(); wizard.init(PlatformUI.getWorkbench(), strcSelection); WizardDialog wizardDialog = new WizardDialog(shell, wizard); wizardDialog.open(); doxyfile = wizard.getDoxyfile(); } return doxyfile; } } eclox/eclox.ui/src/eclox/ui/wizard/0000755000076400007640000000000012166321431016625 5ustar willywillyeclox/eclox.ui/src/eclox/ui/wizard/NewDoxyfileWizard.java0000644000076400007640000000732612166012446023121 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2004, 2007, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.wizard; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.wizard.Wizard; import org.eclipse.ui.INewWizard; import org.eclipse.ui.IWorkbench; import eclox.core.doxygen.Doxygen; import eclox.core.doxygen.InvokeException; import eclox.core.doxygen.RunException; import eclox.ui.Plugin; /** * Implement the new file wizard extension to provide a way to create * new doxyfiles. * * @author gbrocker */ public class NewDoxyfileWizard extends Wizard implements INewWizard { private IFile m_doxyfile; ///< The created doxyfile. private NewDoxyfileWizardPage m_page; ///< The wizard page used to get the file name. /** * Retrieves the created doxyfile. * * @return the created doxyfile, null if none */ public IFile getDoxyfile() { return m_doxyfile; } /** * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection) */ public void init( IWorkbench workbench, IStructuredSelection selection ) { m_page = new NewDoxyfileWizardPage( selection ); addPage( m_page ); setWindowTitle( "New Doxygen Configuration" ); } /** * @see org.eclipse.jface.wizard.Wizard#performFinish() */ public boolean performFinish() { for(;;) { // Creates the doxyfile resource. IFile doxyfile = createFile( m_page.getContainerFullPath(), m_page.getFileName() ); // Warn user if the doxyfile exists. if( doxyfile.exists() ) { MessageDialog.openWarning(getShell(), "Resource Exists", "The resource " + doxyfile.getFullPath().toString() + " already exists !" ); return false; } // Creates the effective resource file. try { Doxygen.getDefault().generate( doxyfile ); m_doxyfile = doxyfile; return true; } // Doxygen returned an error. catch( RunException runException ) { MessageDialog.openError(getShell(), "Doxygen Error", "An error occured while running doxygen. " + runException.toString()); return true; } // Doxygen was impossible to run. catch( InvokeException invokeException ) { if( Plugin.editPreferencesAfterDoxygenInvocationFailed() ) { continue; } // Stops the wizard. return true; } } } /** * Create the resource file. * * @param containerPath The path to the container for the resource to create. * @param fileName A string containnig the name of the file resource to create. * * @return The created file resource. The file system's file hasn't been created at this step. */ private IFile createFile( IPath containerPath, String fileName ) { IFile result; IPath filePath; String fileExtension; filePath = containerPath.append( fileName ); fileExtension = filePath.getFileExtension(); if( (fileExtension == null || fileExtension.compareToIgnoreCase( "Doxyfile" ) != 0) && fileName.compareToIgnoreCase("Doxyfile") != 0 ) { filePath = filePath.addFileExtension( "Doxyfile" ); } result = ResourcesPlugin.getWorkspace().getRoot().getFile( filePath ); return result; } } eclox/eclox.ui/src/eclox/ui/wizard/NewDoxyfileWizardPage.java0000644000076400007640000000463612166012446023717 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui.wizard; import org.eclipse.core.resources.IResource; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.dialogs.WizardNewFileCreationPage; import eclox.ui.Images; import eclox.ui.Plugin; /** * @author gbrocker * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class NewDoxyfileWizardPage extends WizardNewFileCreationPage { /** * Retrieves the initial doxyfile name relative to the given object that * is supposed to be a resource. * * If the object is not an IResourec instance, and adapter is searched for it. */ private static String getInitialFileName( Object object ) { IResource resource; // Skip null objects if( object == null ) { resource = null; } // Try the direct convertion to a IResource else if( object instanceof IResource ) { resource = (IResource) object; } // Try to find an adapter else { resource = (IResource) org.eclipse.core.runtime.Platform.getAdapterManager().getAdapter(object, IResource.class); } // Finally, gets the project name for the resource (if one has been found). return (resource != null) ? (resource.getProject().getName() + ".doxyfile") : new String(); } /** * Constructor. * * @param selection The current selection object. */ public NewDoxyfileWizardPage(IStructuredSelection selection) { super("page", selection); setTitle("Doxygen Configuration"); setDescription("Creates a new Doxygen configuration file."); setFileName( selection != null ? getInitialFileName(selection.getFirstElement()) : new String() ); setImageDescriptor( Plugin.getImageDescriptor(Images.DOXYFILE_WIZARD)); } /** * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#getNewFileLabel() */ protected String getNewFileLabel() { return "Doxyfile &name:"; } } eclox/eclox.ui/src/eclox/ui/PreferencesInitializer.java0000644000076400007640000000251412166012446022642 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.jface.preference.IPreferenceStore; import eclox.ui.IPreferences; /** * Implements the prefenrence initializer for the plugin. * * @author gbrocker */ public class PreferencesInitializer extends AbstractPreferenceInitializer { /** * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() */ public void initializeDefaultPreferences() { IPreferenceStore preferences = Plugin.getDefault().getPreferenceStore(); preferences.setDefault( IPreferences.BUILD_HISTORY_SIZE, 5 ); preferences.setDefault( IPreferences.AUTO_SAVE, IPreferences.AUTO_SAVE_ASK ); preferences.setDefault( IPreferences.HANDLE_ESCAPED_VALUES, true ); } } eclox/eclox.ui/src/eclox/ui/Plugin.java0000644000076400007640000001033012166012446017426 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.dialogs.PreferencesUtil; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; /** * The plugin class. */ /** * @author gbrocker * */ public class Plugin extends AbstractUIPlugin { private static Plugin plugin; ///< The singleton instance. private BuildManager buildManager; ///< The managed build manager. private JobMonitor jobMonitor; ///< The managed job monitor. /** * Asks the user if he wants to edit doxygen configuration after a failed * doxygen invocation. * * @return @c true if doxygen configuration has been edited, @c false otherwise */ public static boolean editPreferencesAfterDoxygenInvocationFailed() { Shell shell = plugin.getWorkbench().getActiveWorkbenchWindow().getShell(); // Asks the user if he wants to edit the preferences to solve the problem. boolean editionWanted = MessageDialog.openQuestion(shell, "Doxygen Not Found", "Eclox was not able to run doxygen. Doxygen is either missing or eclox is not properly configured to use it.\n\nWould you like to edit preferences now ?" ); if( ! editionWanted ) { return false; } // Allows the user to edit the preferences and eventually launch doxygen again. String[] filter = { eclox.core.ui.PreferencePage.ID }; int edited = PreferencesUtil.createPreferenceDialogOn(shell, eclox.core.ui.PreferencePage.ID, filter, null).open(); return edited == Window.OK; } /** * The constructor. */ public Plugin() { plugin = this; } /** * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); buildManager = new BuildManager(); buildManager.restoreState(); jobMonitor = new JobMonitor(); Job.getJobManager().addJobChangeListener(jobMonitor); } /** * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { buildManager.saveState(); buildManager = null; Job.getJobManager().removeJobChangeListener(jobMonitor); jobMonitor = null; plugin = null; super.stop(context); } /** * Returns the shared instance. */ public static Plugin getDefault() { return plugin; } /** * Retrieves the build manager of the plugin. * * @return the managed build manager instance */ public BuildManager getBuildManager() { return buildManager; } /** * Adds the specified throwable object into the plugin's log as an error. * * @param throwable a throwable instance to log */ public static void log( Throwable throwable ) { plugin.getLog().log( new Status(Status.ERROR, plugin.getBundle().getSymbolicName(), 0, "Exception caught. " + throwable.toString(), throwable) ); } /** * Adds the specified message into the plugin's log as an error. * * @param message a string containing a message to log. */ public static void log( String message ) { plugin.getLog().log( new Status(Status.ERROR, plugin.getBundle().getSymbolicName(), 0, "Error encountered. " + message, null) ); } /** * Returns an image descriptor for the image file at the given * plug-in relative path. * * @param path the path * @return the image descriptor */ public static ImageDescriptor getImageDescriptor(String path) { return AbstractUIPlugin.imageDescriptorFromPlugin( plugin.getBundle().getSymbolicName(), path); } } eclox/eclox.ui/src/eclox/ui/PreferencePage.java0000644000076400007640000000456512166012446021060 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; import org.eclipse.jface.preference.BooleanFieldEditor; import org.eclipse.jface.preference.IntegerFieldEditor; import org.eclipse.jface.preference.RadioGroupFieldEditor; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; /** * Implements the plugin preference page. * * @author gbrocker */ public class PreferencePage extends org.eclipse.jface.preference.FieldEditorPreferencePage implements IWorkbenchPreferencePage { /** * Constructor. */ public PreferencePage() { super( GRID ); } public void init( IWorkbench workbench ) { setPreferenceStore( Plugin.getDefault().getPreferenceStore() ); } /** * Creates the preference page fields. */ protected void createFieldEditors() { Composite rootControl = getFieldEditorParent(); // Create the controls. BooleanFieldEditor escapeValueStrings = new BooleanFieldEditor(IPreferences.HANDLE_ESCAPED_VALUES, "Handle escapes for \" and \\ in value strings", rootControl); escapeValueStrings.setPreferenceStore( getPreferenceStore() ); addField( escapeValueStrings ); IntegerFieldEditor historySize = new IntegerFieldEditor(IPreferences.BUILD_HISTORY_SIZE, "Build history size:", rootControl); historySize.setPreferenceStore( getPreferenceStore() ); historySize.setValidRange( 1, 100 ); addField( historySize ); RadioGroupFieldEditor autoSave = new RadioGroupFieldEditor( IPreferences.AUTO_SAVE, "Save all modified files before building", 1, new String[][] { {IPreferences.AUTO_SAVE_NEVER, IPreferences.AUTO_SAVE_NEVER}, {IPreferences.AUTO_SAVE_ALWAYS, IPreferences.AUTO_SAVE_ALWAYS}, {IPreferences.AUTO_SAVE_ASK, IPreferences.AUTO_SAVE_ASK}, }, rootControl, true ); autoSave.setPreferenceStore( getPreferenceStore() ); addField( autoSave ); } } eclox/eclox.ui/src/eclox/ui/BuildManager.java0000644000076400007640000001442212166012446020530 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Preferences; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.ui.PlatformUI; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxygen.BuildJob; import eclox.core.doxygen.IBuildJobListener; import eclox.ui.console.Console; /** * This class is responsible to launch the build for the given doxyfile * and also manages the build history. * * @see Plugin * * @author gbrocker */ public class BuildManager { /** * Implements a job listener that will update the job history as jobs get removed. */ private class MyJobListener implements IBuildJobListener { public void buildJobLogCleared(BuildJob job) { } public void buildJobLogUpdated(BuildJob job, String output) { } public void buildJobRemoved(BuildJob job) { jobHistory.remove( job ); job.removeBuidJobListener( this ); } } /** * Implements a preference listener that will maintain the length of the job history * according to the relevant preference changes. */ private class MyPreferenceListener implements IPropertyChangeListener { public void propertyChange(PropertyChangeEvent event) { if( event.getProperty() == IPreferences.BUILD_HISTORY_SIZE ) { int newSize = ((Integer) event.getNewValue()).intValue(); int curSize = jobHistory.size(); if( curSize > newSize ) { jobHistory = jobHistory.subList( curSize - newSize, curSize ); } } } } private static String STATE_FILE = new String("build-job-history.txt"); private List jobHistory = new LinkedList(); ///< Contains the history the launched build jobs. /** * Constructor */ public BuildManager() { // Attaches a property change listener on the plugin's preference store. Plugin.getDefault().getPreferenceStore().addPropertyChangeListener( new MyPreferenceListener() ); } /** * Launches the build of the given doxyfile. * * @param doxyfile the doxyfile to build */ public void build( IFile doxyfile ) { // Retrieves the plug-in preferences. Preferences preferences = Plugin.getDefault().getPluginPreferences(); // Ask the user if he wants to save all opened editors before proceeding to build. final String autoSave = preferences.getString( IPreferences.AUTO_SAVE ); if( autoSave.equals( IPreferences.AUTO_SAVE_ALWAYS ) ) { PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors( false ); } else if( autoSave.equals( IPreferences.AUTO_SAVE_ASK ) ) { boolean saved; saved = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors( true ); if( saved == false ) { return; } } else if( autoSave.equals( IPreferences.AUTO_SAVE_NEVER) ) { // Nothing to perform. } else { // Not supported. assert( false ); Plugin.log( autoSave + ": unsupported auto save state."); } // Retrieves the build job for the given doxyfile. BuildJob job = BuildJob.getJob( doxyfile ); // Attaches a listener if applicable. if( jobHistory.contains(job) == false ) { job.addBuidJobListener( new MyJobListener() ); } // Updates the job history. int preferedHistorySize = preferences.getInt( IPreferences.BUILD_HISTORY_SIZE ); jobHistory.remove( job ); if( jobHistory.size() >= preferedHistorySize && jobHistory.isEmpty() == false ) { jobHistory.remove( 0 ); } jobHistory.add( job ); // Updates the console. Console.show( job ); // Schedule the job to build. job.schedule(1000); } /** * Retrieves the latest build jobs that have been registered in the history. * * @return an array containing the most recent build jobs. */ public BuildJob[] getRecentBuildJobs() { return (BuildJob[]) jobHistory.toArray( new BuildJob[0] ); } /** * Restores the state from a file. */ public void restoreState() { try { IPath statePath = Plugin.getDefault().getStateLocation().append(STATE_FILE); File stateFile = new File( statePath.toOSString() ); if( stateFile.canRead() == true ) { BufferedReader stateReader = new BufferedReader(new FileReader(stateFile)); String stateLine = stateReader.readLine(); while( stateLine != null ) { IPath doxyfilePath = new Path( stateLine ); IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(doxyfilePath); if( Doxyfile.isDoxyfile(resource) ) { IFile doxyfile = (IFile) resource; BuildJob job = BuildJob.getJob(doxyfile); jobHistory.add(job); } stateLine = stateReader.readLine(); } } } catch( Throwable t ) { Plugin.log( t ); } } /** * Saves the state to a file. */ public void saveState() { IPath statePath = Plugin.getDefault().getStateLocation().append(STATE_FILE); File stateFile = new File( statePath.toOSString() ); stateFile.delete(); // Now saves the resource path of the next doxyfile to build. try { FileWriter stateWriter = new FileWriter( stateFile ); Iterator i = jobHistory.iterator(); while( i.hasNext() ) { BuildJob job = (BuildJob) i.next(); IFile doxyfile = job.getDoxyfile(); stateWriter.write( doxyfile.getFullPath().toString() ); stateWriter.write( String.valueOf('\n') ); } stateWriter.flush(); } catch( Throwable t ) { Plugin.log(t); } } } eclox/eclox.ui/src/eclox/ui/JobMonitor.java0000644000076400007640000000277412166012446020267 0ustar willywilly/******************************************************************************* * Copyright (C) 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.swt.widgets.Display; import eclox.core.doxygen.BuildJob; /** * @brief Monitors all doxygen build jobs and report errors * concerning doxygen invokation failures. * * @author gbrocker */ public class JobMonitor extends JobChangeAdapter { /** * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent) */ public void done(IJobChangeEvent event) { if( event.getJob().belongsTo(BuildJob.FAMILY) && event.getResult().getCode() == BuildJob.ERROR_DOXYGEN_NOT_FOUND ) { Display display = Plugin.getDefault().getWorkbench().getDisplay(); display.asyncExec( new Runnable() { public void run() { Plugin.editPreferencesAfterDoxygenInvocationFailed(); } } ); } } } eclox/eclox.ui/src/eclox/ui/Images.java0000644000076400007640000000163312166012446017403 0ustar willywilly/******************************************************************************* * Copyright (C) 2006-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.ui; public interface Images { static String DOXYFILE_WIZARD = "icons/doxyfile_wiz.gif"; static String CLEAR_CONSOLE = "icons/clear_console.gif"; static String ERASE = "icons/erase.png"; static String LOCK_CONSOLE = "icons/lock_console.gif"; static String TERMINATE = "icons/terminate.gif"; static String REMOVE = "icons/remove_console.gif"; } eclox/eclox.ui/plugin.xml0000644000076400007640000000403710727223666015047 0ustar willywilly eclox/eclox.ui/build.properties0000644000076400007640000000043710432337327016235 0ustar willywillysource.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.xml,\ icons/ src.includes = icons/,\ plugin.xml,\ src/,\ META-INF/,\ .project,\ build.properties eclox/eclox.ui/doc/0000755000076400007640000000000012166321431013554 5ustar willywillyeclox/eclox.ui/doc/eclox.ui.doxyfile0000644000076400007640000014266710616355437017102 0ustar willywilly# Doxyfile 1.5.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = org.gna.eclox.ui # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST = YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = ../src # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO eclox/eclox.ui/doc/.cvsignore0000644000076400007640000000000510616355437015562 0ustar willywillyhtml eclox/eclox.ui/.cvsignore0000644000076400007640000000000410405227706015005 0ustar willywillybin eclox/eclox.ui/.project0000644000076400007640000000120110405226354014452 0ustar willywilly eclox.ui org.eclipse.jdt.core.javabuilder org.eclipse.pde.ManifestBuilder org.eclipse.pde.SchemaBuilder org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature eclox/eclox.ui/.classpath0000644000076400007640000000045410405226354014777 0ustar willywilly eclox/eclox.ui/icons/0000755000076400007640000000000012166321432014123 5ustar willywillyeclox/eclox.ui/icons/doxyfile_wiz.gif0000644000076400007640000000472610600467172017342 0ustar willywillyGIF89aKBddefffggh i i jkkklllmmnnoopqqqr!su#u$u'u#v%v'v'w(w+w*x+x-y.z-|1{/|/|4|75:>;;@cyDFGGJMNTQOYPVXU{Z]`^jlkgsphonmos}}~y{¢èXƦͳҶsƵĶd¿´Ĵ侊ŴƵȉғԱ!,KB H*\XĭNǒEȭ۷p%W!ڋzpسgrEaU!vŻKAs1㫎#OL ̚}RwoT&MeJUfuăȌKGǑ C6[yvب2\سk߾)dq*BW֧[Ͼ: ;iЩF;K]`4X% EtW#N82xcf18$4 *N7(Qa}$ւ:=(S)DI_|x#=$<SDWX%qx,:&s"r^D8fp|#DO"`a()9 La}#}:>6Yx (p `~w8o <~P0X݀kEGX"J"̆R5P6v* a?O "H9*ؼq,T@"8aD yL`Y !Aa #>Ve4#A; j&H1JV~&7I M1MӋ+AJ'JC@"A)U@ ,I)I!F.w]ROBHDYnt@YʲوB/{)jZ0qwap&#p)C3gi !^# ׌g5zZSF6B 3/8:+! C"!,Gk D!z {JCg&\5P )(MiJAϋjS 4c F5ҞhKyd`GMoSK씧Y)3OIUjծz\IS>wU&ذ3A׺Uȫ^jhuNP/VU3~(16T$_qX V6wX&v}G Y5=2.z̚v4Hj̖vVq׽YoK_ 7jzJ:EmK7~*.0T^/S~ `X 17|  '5P[qONfnJ c&Ѝ8 kA7ڢ`~NQ`w!n{T)(rTsq%xXE.GëTQINo43bXNiu᎜_ @n `Oc_x"u.6S,::(V<(V$C Culӓ)!5xENe;>Kb,Ob TQZtʯ[NXލGxͱƩ:BhLi?qUƑIENDB`eclox/eclox.ui/icons/doxyfile_wizard.png0000644000076400007640000000126310417753240020041 0ustar willywillyPNG  IHDRabKGDZ(| pHYs  tIME2oi@IDAT8˭KHQwb,'u0,3IlaE)؃" ! Qe" 2B"+$4{AXGQ|-r ̱E==1+euW]CV)3y3 >:3$$23)2;3++84&&%  7aPP_,,- -`RddR^..'*"fbFXeecFM/(!3f]Za]]aZ]10"y ?<C$f eJ&N83[\ɒ劒-6l<၀3\$B%. $(<-@v1d&;eclox/eclox.ui/icons/erase.png0000644000076400007640000000054110417753240015733 0ustar willywillyPNG  IHDR bKGD pHYs  tIMEmթIDAT]JAgוUUiB @"UB|I6!ҧ7!H$~Y(z<;wBxP8£Izvv |Ci=l|N.ē xRз$Q AmD^Y`a->!.1*)6%mA[CкU=kvvwzπЁ҄҇ԈԊԎבԲhԲiղiڽ|ȏ! ,22kA21hjijDB0gGD@0,efa8 /Q-+d_*KbM5 %)c4.H=: &`L7 !Z3'F9( XO"E<D!U8@S:aÅ7d@;eclox/eclox.ui/icons/clear_console.gif0000644000076400007640000000112310417465604017426 0ustar willywillyGIF89a©ƚˢϨӬݚtwwz}ǿǵqųsŴs±uzȏԲhԲiڽ|ղi~~~tttsssrrrqqqooonnndddccc^^^]]]YYYUUUSSSRRRQQQPPPOOONNN!U,U5U5=56% >?7U-$ ;><8/#.9"0132 !4: EJDELEU+ʠK@CDAKU,EM@KBM*ˢNIE<P% jP )Hx3A Rنd 'DEh3"ǓU;eclox/eclox.help/0000755000076400007640000000000012166321431013322 5ustar willywillyeclox/eclox.help/META-INF/0000755000076400007640000000000012166321431014462 5ustar willywillyeclox/eclox.help/META-INF/MANIFEST.MF0000644000076400007640000000032712166012446016121 0ustar willywillyManifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Eclox Help Plug-in Bundle-SymbolicName: org.gna.eclox.help; singleton:=true Bundle-Version: 0.10.0 Bundle-Vendor: Guillaume Brocker Bundle-Localization: eclox/eclox.help/README0000644000076400007640000000021110347236674014211 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/README * eclox/eclox.help/plugin.xml0000644000076400007640000000037110347325624015352 0ustar willywilly eclox/eclox.help/AUTHORS0000644000076400007640000000021310347236674014403 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/AUTHORS * eclox/eclox.help/TODO0000644000076400007640000000020510347236674014024 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/TODO * eclox/eclox.help/toc.xml0000644000076400007640000000053410347325624014642 0ustar willywilly eclox/eclox.help/eclox.svg0000644000076400007640000006425210667250760015200 0ustar willywilly image/svg+xml doxyfile eclipse eclox doxygen docs HTML, LaTeX, ... warnings & errors edition compilation eclox/eclox.help/CHANGES0000644000076400007640000000021310347236674014326 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/CHANGES * eclox/eclox.help/MANUAL0000644000076400007640000000021110347236674014231 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/MANUAL * eclox/eclox.help/html/0000755000076400007640000000000012166321431014266 5ustar willywillyeclox/eclox.help/html/about.html0000644000076400007640000000126312166321337016275 0ustar willywilly Getting Started

About

Eclox, a Doxygen frontend plugin for Eclipse (home page).

Copyright (C) 2003-20013 Guillaume Brocker

All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html.

eclox/eclox.help/html/index.html0000644000076400007640000000100510347576600016270 0ustar willywilly

Eclox Guide

Eclox, a Doxygen frontend plugin for Eclipse.

Content

Related

eclox/eclox.help/html/getting_started.html0000644000076400007640000000500110335145406020341 0ustar willywilly Getting Started

Getting Started

Configuration

Once the plugin installed, you must ensure that the default PATH environment variable makes the doxygen binary reachable for the plugin. If not, you can update PATH to include to directory containing the Doxygen binary, or you can tell Eclox where that binary is located on your system (which is in my opinion the better solution). To do this, open Eclipse's preference edition dialog window and go into the new "Doxygen" section.

Usage

You can create new Doxygen projects (also called doxyfiles) using the creation wizard. Go to "File->New->Other->Other->Doxygen Configuration". Press next and set both file location and name. Then a empty doxyfile will be created at the specified location, the wizard automatically adds the ".Doxyfile" extension.

You should now see a file with a yellow question mark icon. This is your new doxyfile. Double-clicking on it will open the editor. You can now browse and edit the settings.

Once your have properly set all doxyfile fields, you can launch a documentation build using the toolbar icon showing a yellow question mark. In the case the button is not visible in the toolbar, your current perspective needs to get configured. Go to "Window->Customize perspective->Commands" and in "Available command groups" check "Doxygen". Additionnaly, you can browse the latest builds by clicking the down arrow right to the toolbar button.

When the documentation build starts, a new view showing the build log opens. In its toolbar, a button named "Stop" allows you to halt the current build process. The current build also appears in the Eclipse job progress view and you can control the job from there.

The build toolbar action determine the next doxyfile to build depending on the current active workbench part (editor or view) and the current selection in that part. For example, if the active part is a doxyfile editor, the next doxyfile to build will be the one being edited. If the active part is the resource explorer and the current selection is a doxyfile, that doxyfile will be next to get build. In the case the active part selection doesn't correspond to a doxyfile, the last built doxyfile will be rebuiled. And if the build history is empty, you will be asked for the doxyfile to build.

eclox/eclox.help/COPYING0000644000076400007640000000021310347236674014366 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/COPYING * eclox/eclox.help/build.properties0000644000076400007640000000105010347236674016550 0ustar willywillybin.includes = META-INF/,\ plugin.xml,\ html/,\ toc.xml,\ AUTHORS,\ CHANGES,\ COPYING,\ MANUAL,\ README,\ TODO src.includes = .project,\ META-INF/,\ build.properties,\ html/,\ plugin.xml,\ toc.xml,\ AUTHORS,\ CHANGES,\ COPYING,\ MANUAL,\ README,\ TODO eclox/eclox.help/.project0000644000076400007640000000073510335145406015000 0ustar willywilly eclox.help org.eclipse.pde.ManifestBuilder org.eclipse.pde.SchemaBuilder org.eclipse.pde.PluginNature eclox/eclox.core/0000755000076400007640000000000012166321431013322 5ustar willywillyeclox/eclox.core/META-INF/0000755000076400007640000000000012166321431014462 5ustar willywillyeclox/eclox.core/META-INF/MANIFEST.MF0000644000076400007640000000152412166012446016121 0ustar willywillyManifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Eclox Core Bundle-SymbolicName: org.gna.eclox.core; singleton:=true Bundle-Version: 0.10.0 Bundle-Vendor: Guillaume Brocker Bundle-Localization: Require-Bundle: org.eclipse.core.resources, org.eclipse.core.runtime, org.eclipse.ui Bundle-Activator: eclox.core.Plugin Export-Package: eclox.core;uses:="org.eclipse.core.runtime.preferences,org.osgi.framework,org.eclipse.core.runtime", eclox.core.doxyfiles;uses:="org.eclipse.core.resources,org.eclipse.core.runtime", eclox.core.doxyfiles.io;uses:="eclox.core.doxyfiles", eclox.core.doxygen;uses:="org.eclipse.core.resources,org.eclipse.core.runtime.jobs,org.eclipse.core.runtime", eclox.core.ui; uses:="org.eclipse.jface.preference, org.eclipse.jface.viewers, org.eclipse.swt.widgets, org.eclipse.ui" Eclipse-LazyStart: true eclox/eclox.core/src/0000755000076400007640000000000012166321431014111 5ustar willywillyeclox/eclox.core/src/eclox/0000755000076400007640000000000012166321431015223 5ustar willywillyeclox/eclox.core/src/eclox/core/0000755000076400007640000000000012166321431016153 5ustar willywillyeclox/eclox.core/src/eclox/core/IPreferences.java0000644000076400007640000000170512166012446021376 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core; /** * Provides all preference names of the plugin. * * @author gbrocker */ public interface IPreferences { /** * Constant definition for the default doxygen wrapper to use. */ public static final String DEFAULT_DOXYGEN = "doxygen.default"; /** * Constant definition for the user defined doxygen wrappers. */ public static final String CUSTOM_DOXYGENS = "doxygen.customs"; } eclox/eclox.core/src/eclox/core/doxyfiles/0000755000076400007640000000000012166321431020161 5ustar willywillyeclox/eclox.core/src/eclox/core/doxyfiles/ISettingPropertyListener.java0000644000076400007640000000246212166012446026034 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; /** * Derfines the interface for listeners receiving notifications about property changes. * * @author gbrocker */ public interface ISettingPropertyListener extends ISettingListener { /** * Notifies that a setting property has been added or its has changed. * * @param setting the setting that raised the event * @param property a string containing a property name */ void settingPropertyChanged( Setting setting, String property ); /** * Notifies that a setting property has been removed. * * @param setting the setting that raised the event * @param property a string containing a property name */ void settingPropertyRemoved( Setting setting, String property ); } eclox/eclox.core/src/eclox/core/doxyfiles/Group.java0000644000076400007640000000327312166012446022130 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; import java.util.Collection; import java.util.Iterator; import java.util.Vector; /** * Implements a group of settings. * * @author gbrocker */ public class Group { /** * a string containing the group name */ private String name; /** * a collection of all settings in the group */ private Collection settings = new Vector(); /** * Constructor * * @param name a string containing the group name */ public Group( String name ) { this.name = new String( name ); } /** * Addes a new setting in the group. * * @param setting a setting to add to the group */ public void add( Setting setting ) { settings.add( setting ); } /** * Retrieves the group name. * * @return a string containing the group name */ public String getName() { return new String( this.name ); } /** * Retrieves an iterator on all managed settings. * * @return an iterator */ public Iterator iterator() { return settings.iterator(); } } eclox/eclox.core/src/eclox/core/doxyfiles/Chunk.java0000644000076400007640000000251412166012446022101 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2004, 2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; /** * Implements the default item that can be contained in a doxyfile. * * A chunk is a piece of text extracted from e doxyfile. It can represent comments, * empty lines or whatever. * * @author Guillaume Brocker */ public abstract class Chunk { /** * the chunk owner (aka the doxyfile) */ private Doxyfile owner; /** * Retrieves the chunk owner. * * @return the chunk owner */ public Doxyfile getOwner() { return owner; } /** * Updates the chunk owner * * @param owner the new owner */ public void setOwner( Doxyfile owner ) { this.owner = owner; } /** * Converts the chunk into a string representing its content. * * @return a string containing the chunk content */ public abstract String toString(); } eclox/eclox.core/src/eclox/core/doxyfiles/io/0000755000076400007640000000000012166321431020570 5ustar willywillyeclox/eclox.core/src/eclox/core/doxyfiles/io/Parser.java0000644000076400007640000002301512166012446022673 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles.io; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.regex.Matcher; import java.util.regex.Pattern; //import eclox.core.Services; import eclox.core.Plugin; import eclox.core.doxyfiles.Chunk; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxyfiles.RawText; import eclox.core.doxyfiles.Setting; /** * Implements a doxyfile parser. * * @author gbrocker */ public class Parser { /** * the current line number */ private int lineNumber = 0; /** * The line reader used to parse the input stream. */ private BufferedReader reader; /** * The comment line pattern. */ private Pattern commentPattern = Pattern.compile("#.*"); /** * the empty line pattern */ private Pattern emptyPattern = Pattern.compile("\\s*"); /** * the setting assignment pattern */ private Pattern settingAssignmentPattern = Pattern.compile("(\\w+)\\s*=\\s*(.*?)\\s*(\\\\)?"); /** * the setting increment pattern */ private Pattern settingIncrementPattern = Pattern.compile("(\\w+)\\s*\\+=\\s*(.*?)\\s*(\\\\)?"); /** * the continued setting assignment pattern */ private Pattern continuedSettingAssignmentPattern = Pattern.compile("\\s*(.+?)\\s*(\\\\)?"); /** * the include directive pattern */ private Pattern includePattern = Pattern.compile("@INCLUDE\\s*=\\s*(.*)"); /** * the include path pattern */ private Pattern includePathPattern = Pattern.compile("@INCLUDE_PATH\\s*=\\s*(.*)"); /** * Constructor. * * @param input an input stream instance to parse as a doxyfile */ public Parser( InputStream input ) throws IOException { this.reader = new BufferedReader( new InputStreamReader(input) ); this.reader.mark(0); } /** * Reads the input stream and returns the doxyfile. * * @param doxyfile a doxyfile where the parser results will be stored * * @return a collection of the setting read from the input stream */ public void read( Doxyfile doxyfile ) throws IOException { // Initialization of the system. this.reader.reset(); this.lineNumber = 0; // Reads and parses all lines. try { String line; for( line = reader.readLine(); line != null; line = reader.readLine() ) { lineNumber++; this.matchLine( doxyfile, line ); } } catch(Throwable throwable) { throw new IOException( "Syntax error at line " + lineNumber + ". " + throwable.getMessage() ); } } /** * Matches the specified line. * * @param doxyfile a doxyfile where the result will be stored * @param line a string containing the current line text */ private void matchLine( Doxyfile doxyfile, String line ) throws IOException { Matcher matcher; // Matches the current line against an empty line pattern matcher = emptyPattern.matcher( line ); if( matcher.matches() == true ) { this.processAnyLine( doxyfile, line ); return; } // Matches the current line against the comment pattern. matcher = commentPattern.matcher( line ); if( matcher.matches() == true ) { this.processAnyLine( doxyfile, line ); return; } // Matches the current line against the setting assignment pattern. matcher = settingAssignmentPattern.matcher( line ); if( matcher.matches() == true ) { // Retrieves the setting identifier and its values. String identifier = matcher.group(1); String values = matcher.group(2); // Call the traitement for the setting assignment and pull out. this.processSettingAssignment( doxyfile, identifier, values ); return; } // Matches the current line against the setting increment pattern. matcher = settingIncrementPattern.matcher( line ); if( matcher.matches() == true ) { // Retrieves the setting identifier and its values. String identifier = matcher.group(1); String values = matcher.group(2); // Call the treatment for the setting assignment and pull out. this.processSettingIncrement( doxyfile, identifier, values ); return; } // Matches the current line against the include directive pattern. matcher = includePattern.matcher( line ); if( matcher.matches() == true ) { this.processAnyLine( doxyfile, line ); return; } // Matches the current line agains the include path directive pattern. matcher = includePathPattern.matcher( line ); if( matcher.matches() == true ) { this.processAnyLine( doxyfile, line ); return; } // Matches the current line against the continued setting assignment pattern. matcher = continuedSettingAssignmentPattern.matcher( line ); if( matcher.matches() == true ) { // Retrieves the setting identifier and its values. String values = matcher.group(1); String continued = matcher.group(2); // Call the treatment for the continued setting assignment and pull out. this.processContinuedSettingAssignment( doxyfile, values, continued != null ); return; } // The line has not been recognized. throw new IOException( "Unable to match line." ); } /** * Processes any line of a doxyfile that is not interesting and should only be stored * for later use (saving for example). * * @param doxyfile a doxyfile where the line will be stored * @param text a string containing the line text */ private void processAnyLine( Doxyfile doxyfile, String text ) { // Retrieves the last raw text chunk. Chunk lastChunk = doxyfile.getLastChunk(); RawText rawText; if( lastChunk instanceof RawText ) { rawText = (RawText) lastChunk; } else { rawText = new RawText(); doxyfile.append( rawText ); } // Stores the line's text in the raw text chunk. rawText.append( text ); rawText.append( "\n" ); } /** * Processes a setting assignment line. * * @param doxyfile a doxyfile where the setting assignment will be stored * @param identifier a string containing the setting identifier * @param value a string containing the assigned value */ private void processSettingAssignment( Doxyfile doxyfile, String identifier, String value ) throws IOException { // Retrieves the setting. Setting setting = doxyfile.getSetting( identifier ); if( setting == null ) { setting = new Setting( identifier, value ); doxyfile.append( setting ); } // Updates the setting value. setting.setValue( value ); } /** * Processes a setting increment line. * * @param doxyfile a doxyfile where the setting assignment will be stored * @param identifier a string containing the setting identifier * @param value a string containing the assigned value */ private void processSettingIncrement( Doxyfile doxyfile, String identifier, String value ) throws IOException { // Retrieves the setting from the doxyfile. Setting setting = doxyfile.getSetting( identifier ); if( setting != null ) { // Updates the continued setting's value. setting.setValue( setting.getValue() + " " + value ); } else { Plugin.getDefault().logWarning( "At line " + lineNumber + ": the setting was not declared before." ); processSettingAssignment( doxyfile, identifier, value ); } } /** * Processes a setting assignment line. * * @param doxyfile a doxyfile where the setting assignment will be stored * @param value a string containing the assigned value * @param continued a boolean telling if the setting assignment is continued on multiple line */ private void processContinuedSettingAssignment( Doxyfile doxyfile, String value, boolean continued ) throws IOException { Chunk lastChunk = doxyfile.getLastChunk(); // Ensures that a continued setting has been remembered // and updates it. if( lastChunk instanceof Setting ) { Setting continuedSetting = (Setting) lastChunk; continuedSetting.setValue( continuedSetting.getValue() + " " + value ); } else { Plugin.getDefault().logWarning( "At line " + lineNumber + ": value delcared without a setting name." ); } } } eclox/eclox.core/src/eclox/core/doxyfiles/io/Serializer.java0000644000076400007640000000433212166012446023551 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles.io; import java.io.IOException; import java.io.InputStream; import java.util.Iterator; import eclox.core.doxyfiles.Chunk; import eclox.core.doxyfiles.Doxyfile; /** * Implements a doxyfile content serializer. * * @author willy */ public class Serializer extends InputStream { /** * an iterator on the doxyfile chunks */ private Iterator chunkIterator; /** * a string buffer containing the next character to red */ private StringBuffer stringBuffer; /** * Constructor * * @param doxyfile a doxyfile to serialize */ public Serializer( Doxyfile doxyfile ) { this.chunkIterator = doxyfile.iterator(); this.stringBuffer = getNextStringBuffer(); } public int read() throws IOException { int result; if( stringBuffer != null ) { // Retrieves the next character from the current string buffer. result = stringBuffer.charAt( 0 ); stringBuffer.deleteCharAt( 0 ); // If the current string buffer has been entierly read, gets the next string buffer. if( stringBuffer.length() == 0 ) { stringBuffer = getNextStringBuffer(); } } else { result = -1; } return result; } /** * Retrieves the next string buffer to use for reading operations or null * if no more chunk is left in the doxyfile. * * @return a string buffer or null of none */ private StringBuffer getNextStringBuffer() { // Pre-condition assert chunkIterator != null; // Retrieves the next string buffer. StringBuffer result = null; if( this.chunkIterator.hasNext() == true ) { Chunk chunk = (Chunk) this.chunkIterator.next(); result = new StringBuffer( chunk.toString() ); } return result; } } eclox/eclox.core/src/eclox/core/doxyfiles/ISettingValueListener.java0000644000076400007640000000164612166012446025267 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; /** * Defines the interface for listener listening for setting value changes. * * @author gbrocker */ public interface ISettingValueListener extends ISettingListener { /** * Notifies that a setting value changed. * * @param setting the setting that raised the event */ void settingValueChanged( Setting setting ); } eclox/eclox.core/src/eclox/core/doxyfiles/ISettingListener.java0000644000076400007640000000134712166012446024270 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2005, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; /** * Defines the interface for objects that want to receive information about * setting changes. * * @author gbrocker */ public interface ISettingListener {} eclox/eclox.core/src/eclox/core/doxyfiles/Setting.java0000644000076400007640000002216712166012446022454 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2013 Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; import java.io.InputStream; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; import eclox.core.Plugin; import eclox.core.doxyfiles.Chunk; /** * Implements the setting chunk. * * @author gbrocker */ public class Setting extends Chunk { /** * The value pattern. */ private static Pattern valuePattern = Pattern.compile("([^ \"]+)\\s*|\"((\\\\\"|.)*?)\"\\s*"); /** * The default setting properties. */ private static Properties defaultProperties; /** * A string containing the node identifier. */ private final String identifier; /** * A collection with all attached listeners */ private Set listeners = new HashSet(); /** * The string containing the setting value. */ private String value; /** * The setting local properties. */ private Properties properties = new Properties(); /** * Defines the group property name. */ public static final String GROUP = "group"; /** * Defines the note property name. */ public static final String NOTE = "note"; /** * Defines the text property name. */ public static final String TEXT = "text"; /** * Defines the type property name. */ public static final String TYPE = "type"; /** * Initializes all setting default properties. */ private static void initDefaultProperties() { // Ensures that properties have been loaded. if( defaultProperties == null ) { try { InputStream propertiesInput = Plugin.class.getResourceAsStream("/misc/setting-properties.txt"); defaultProperties = new Properties(); defaultProperties.load( propertiesInput ); } catch( Throwable throwable ) { Plugin.log( throwable ); } } } /** * Retrieves the specified default property given a setting. * * @param setting a setting instance * @param property a string containing the name of the property to retrieve. * * @return a string containing the desired property value or null when * no such property exists */ private static String getDefaultPropertyValue( Setting setting, String property ) { initDefaultProperties(); String propertyIdentifier = setting.getIdentifier() + "." + property; return defaultProperties.getProperty( propertyIdentifier ); } /** * Constructor. * * @param identifier a string containing the setting identifier * @param value a string containing the setting value */ public Setting(String identifier, String value) { this.identifier = new String(identifier); this.value = new String(value); } /** * Attaches a new setting listener instance. * * @param listener a new setting listener instance */ public void addSettingListener(ISettingListener listener) { this.listeners.add( listener ); } /** * Retrieves the node identifier. * * @return a string containing the node identifier */ public final String getIdentifier() { return this.identifier; } /** * Retrieves the value of the specified property. * * @param property a string containing a property name * * @return a string containing the property value or null when the property was not found */ public String getProperty( String property ) { if( properties.containsKey( property) ) { return properties.getProperty( property ); } else { return getDefaultPropertyValue( this, property ); } } /** * Retrieves the setting value. * * @return a string containing the setting value */ public String getValue() { return value; } /** * Retrieves the splitted setting value. * * @param collection a collection instance that will receive the value parts * * @return the collection that received the value parts */ public Collection getSplittedValue(Collection collection) { Matcher valueMatcher = valuePattern.matcher(value); while( valueMatcher.find() == true ) { String value = valueMatcher.group( 1 ); if( value == null ) { value = valueMatcher.group( 2 ).trim(); } collection.add( value ); } return collection; } /** * Tells if the setting has the givgen property set. * * @param property a string containing a property name * * @return a boolean */ public boolean hasProperty( String property ) { if( properties.containsKey( property) ) { return true; } else { return getDefaultPropertyValue( this, property ) != null; } } /** * Detaches a new setting listener instance. * * @param listener a attached setting listener instance */ public void removeSettingListener(ISettingListener listener) { this.listeners.remove( listener ); } /** * Updates the value of a given property. * * @param property a string containing the name of property * @param value a string containing the property value */ public void setProperty( String property, String value ) { // Updates the given property. properties.setProperty( property, value ); // Walks through the attached listeners and notify them. Iterator i = this.listeners.iterator(); while( i.hasNext() == true ) { ISettingListener listener = (ISettingListener) i.next(); if( listener instanceof ISettingPropertyListener ) { ISettingPropertyListener propertyListener = (ISettingPropertyListener) listener; propertyListener.settingPropertyChanged( this, property ); } } } /** * Removes the given property for the setting. * * @param property a string containing a property name */ public void removeProperty( String property ) { if( properties.containsKey( property ) ) { properties.remove( property ); // Walks through the attached listeners and notify them. Iterator i = this.listeners.iterator(); while( i.hasNext() == true ) { ISettingListener listener = (ISettingListener) i.next(); if( listener instanceof ISettingPropertyListener ) { ISettingPropertyListener propertyListener = (ISettingPropertyListener) listener; propertyListener.settingPropertyRemoved( this, property ); } } } } /** * Updates the value of the setting. * * @param value a string representing a value to set */ public void setValue(String value) { this.value = new String(value); fireValueChangedEvent(); } /** * Updates the value of the string with the given object collection. All objects * of the given collection will be converted to strings. * * @param compounds a collection of objects representing compounds of the new value */ public void setValue( Collection compounds ) { // Resets the managed value string. value = new String(); // Walks through the comounds to rebuild the value. Iterator i = compounds.iterator(); while( i.hasNext() ) { // Retrieves the current compound. String compound = i.next().toString(); // Removes any leading and tralling spaces and manage the insertion. compound = compound.trim(); if( compound.length() == 0 ) { continue; } else if( compound.indexOf(' ') != -1 ) { value = value.concat( "\"" + compound + "\" " ); } else { value = value.concat( compound + " " ); } } // Notifies all observers. fireValueChangedEvent(); } public String toString() { return this.identifier + " = " + this.value + "\n"; } /** * Notifies all observers that the setting value has changed. */ private void fireValueChangedEvent() { Iterator i = listeners.iterator(); while( i.hasNext() == true ) { ISettingListener listener = (ISettingListener) i.next(); if( listener instanceof ISettingValueListener ) { ISettingValueListener valueListener = (ISettingValueListener) listener; valueListener.settingValueChanged( this ); } } } } eclox/eclox.core/src/eclox/core/doxyfiles/RawText.java0000644000076400007640000000224212166012446022425 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2004, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; import eclox.core.doxyfiles.Chunk; /** * Implements a raw text chunk. * * @author willy */ public class RawText extends Chunk { /** * a string containing the raw text piece */ private String content = new String(); /** * Appends a new piece of text to the raw text chunk. * * @param text a string containing a piece of text to append */ public void append( String text ) { content += text; } /** * Retrieves the raw text content as a string. * * @return a string containing the raw text content */ public String toString() { return new String( content ); } } eclox/eclox.core/src/eclox/core/doxyfiles/ResourceCollector.java0000644000076400007640000000660112166012446024470 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceVisitor; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; /** * Implements a resource collector that will search for available doxyfiles * either from the workbenck resources' root or from a given resource. * * @author gbrocker */ public class ResourceCollector implements IResourceVisitor { /** * a collection of all collected resources */ private Collection m_doxyfiles = new ArrayList(); /** * Runs a collector from the workspace resources' root. * * @return a resource collector containing collected doxfiles */ public static ResourceCollector run() throws CoreException { return run( ResourcesPlugin.getWorkspace().getRoot() ); } /** * Runs a collector from the given root resource. * * @param resource a resource to search for doxyfiles * * @return a resource collector containing collected doxfiles */ public static ResourceCollector run(IResource root) throws CoreException { ResourceCollector collector = new ResourceCollector(); root.accept( collector ); return collector; } /** * @see org.eclipse.core.resources.IResourceVisitor#visit(org.eclipse.core.resources.IResource) */ public boolean visit(IResource resource) throws CoreException { // Determine if the current resource is doxyfile, and if so, stores the resource if( resource.isAccessible() && Doxyfile.isDoxyfile(resource) == true ) { m_doxyfiles.add( resource ); } return true; } /** * Tells if the collector is empty. * * @return true or false */ public boolean isEmpty() { return m_doxyfiles.isEmpty(); } /** * Retrieves the first doxyfile. * * @return the first doxyfile, or null when none */ public IFile getFirst() { return m_doxyfiles.isEmpty() ? null : (IFile) m_doxyfiles.iterator().next(); } /** * Retrieves the collection with all collected dixyfile resources. * * @return a collection with all collected doxyfile resources */ public Collection getDoxyfiles() { return m_doxyfiles; } /** * Retrieves the number of collected doxyfiles. * * @return the number of collected doxyfiles */ public int getSize() { return m_doxyfiles.size(); } /** * Retrieves the iterator on the collection of collected doxyfile resources. * * @return an iterator instance */ public Iterator iterator() { return m_doxyfiles.iterator(); } } eclox/eclox.core/src/eclox/core/doxyfiles/Doxyfile.java0000644000076400007640000001701312166012446022614 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2004, 2007, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxyfiles; import java.io.IOException; import java.util.AbstractList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Vector; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.content.IContentType; import eclox.core.doxyfiles.io.Parser; /** * Implements the Doxyfile wrapper. * * @author gbrocker */ public class Doxyfile { /** * the file that holds the doxyfile content */ private IFile file; /** * a collection containing all doxyfile's chunks */ private AbstractList chunks = new Vector(); /** * a map containing all managed settings */ private Map settings = new LinkedHashMap(); /** * a map containing all managed groups */ private Map groups = new LinkedHashMap(); /** * Tells if the given object is a doxyfile * * @param object an object to test * * @return true or false */ public static boolean isDoxyfile(Object object) { return (object instanceof IResource) && isDoxyfile((IResource) object); } /** * Tells if the specified resource is a doxyfile. * * @param resource the resource to test * * @return true or false */ public static boolean isDoxyfile(IResource resource) { return (resource instanceof IFile) && isDoxyfile((IFile) resource); } /** * Tells if the specified file is a doxyfile. * * @param file the file to test * * @return true or false */ public static boolean isDoxyfile(IFile file) { String name = file.getName(); IContentType contentType = Platform.getContentTypeManager().findContentTypeFor( name ); return contentType != null ? contentType.getId().equals("org.gna.eclox.core.doxyfile") : false; } /** * Constructor * * @param file a file resource instance that is assumed to be a doxyfile */ public Doxyfile( IFile file ) throws IOException, CoreException { this.file = file; Parser parser = new Parser(file.getContents()); parser.read( this ); } /** * Appends a new chunk to the doxyfile. * * @param chunk a chunk to append to the doxyfile */ public void append( Chunk chunk ) { // Pre-condition assert chunk.getOwner() == null; // References the chunk. chunk.setOwner( this ); this.chunks.add( chunk ); // Do special handling for settings. if( chunk instanceof Setting ) { Setting setting = (Setting) chunk; this.settings.put( setting.getIdentifier(), setting ); // Retrieves the setting group name. String groupName = setting.getProperty( Setting.GROUP ); if( groupName == null ) { groupName = new String( "Others" ); setting.setProperty( Setting.GROUP, groupName ); } // Retrieves the setting group and stores the setting in it. Group group = (Group) this.groups.get( groupName ); if( group == null ) { group = new Group( groupName ); this.groups.put( groupName, group ); } group.add( setting ); } } /** * Retrieves the resource file that contains the doxyfile. * * @return a resource file */ public IFile getFile() { return file; } /** * Retrieves all groups present in the doxyfile. * * @return an array containing all groups */ public Object[] getGroups() { return this.groups.values().toArray(); } /** * Retrieves the last appended chunk * * @return the last added chunk or null if none */ public Chunk getLastChunk() { if( this.chunks.isEmpty() == false ) { return (Chunk) this.chunks.get( this.chunks.size() - 1 ); } else { return null; } } /** * Retrieves the container that will receive the documentation build outputs. * * @return a folder, or null when none */ public IContainer getOutputContainer() { IContainer outputContainer = null; Setting outputSetting = getSetting("OUTPUT_DIRECTORY"); if( outputSetting != null ) { Path outputPath = new Path(outputSetting.getValue()); if( outputPath.isEmpty() ) { outputContainer = file.getParent(); } else if( outputPath.isAbsolute() ) { IContainer[] foundContainers = ResourcesPlugin.getWorkspace().getRoot().findContainersForLocation(outputPath); outputContainer = foundContainers.length == 1 ? foundContainers[0] : null; } else { IPath fullOutputPath = file.getParent().getLocation().append(outputPath); IContainer[] foundContainers = ResourcesPlugin.getWorkspace().getRoot().findContainersForLocation(fullOutputPath); outputContainer = foundContainers.length == 1 ? foundContainers[0] : null; } } return outputContainer; } /** * Retrieves a single setting for the specified identifier. * * @param identifier a string containing a setting identifier * * @return the found setting or null if none */ public Setting getSetting( String identifier ) { return (Setting) settings.get(identifier); } /** * Retrieves all settings as an array * * @return an array of settings */ public Object[] getSettings() { return settings.values().toArray(); } /** * Tells if the doxyfile has the given setting. * * @param identifier a string containing a setting identifier * * @return true or false */ public boolean hasSetting( String identifier ) { return settings.get(identifier) != null; } /** * Tells if the given path is relative to the doxyfile. * * @return true or false */ public boolean isPathRelative( IPath path ) { return file.getLocation().removeLastSegments(1).isPrefixOf( path ); } /** * Makes the given path relative to the doxyfile path only of the given * path point to a location that is in the sub-directory containing the * doxyfile. * * @return the argument path made relative to the doxyfile */ public IPath makePathRelative( IPath path ) { if( isPathRelative(path) ) { int matchingCount = file.getLocation().removeLastSegments(1).matchingFirstSegments( path ); IPath relativePath = path.removeFirstSegments( matchingCount ).setDevice( new String() ); return relativePath.isEmpty() ? new Path(".") : relativePath; } else { return path; } } /** * Retrieves the iterator the whole chunk collection. * * @return an iterator on chunks */ public Iterator iterator() { return this.chunks.iterator(); } /** * Retrieves the iterator on the setting collection. * * @return an iterator on Setting instances */ public Iterator settingIterator() { return settings.values().iterator(); } } eclox/eclox.core/src/eclox/core/PreferencesInitializer.java0000644000076400007640000000246012166012446023470 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core; import org.eclipse.core.runtime.Preferences; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import eclox.core.Plugin; import eclox.core.doxygen.DefaultDoxygen; /** * Implements the prefenrence initializer for the plugin. * * @author gbrocker */ public class PreferencesInitializer extends AbstractPreferenceInitializer { /** * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences() */ public void initializeDefaultPreferences() { Preferences preferences = Plugin.getDefault().getPluginPreferences(); preferences.setDefault( IPreferences.DEFAULT_DOXYGEN, new DefaultDoxygen().getIdentifier() ); preferences.setDefault( IPreferences.CUSTOM_DOXYGENS, "" ); } } eclox/eclox.core/src/eclox/core/Plugin.java0000644000076400007640000000435712166012446020270 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core; import org.eclipse.core.runtime.Status; import org.osgi.framework.BundleContext; /** * Implements the core eclox plugin * * @author gbrocker */ public class Plugin extends org.eclipse.core.runtime.Plugin { /** * the default plugin instance */ private static Plugin plugin; /** * The constructor. */ public Plugin() { plugin = this; } /** * This method is called upon plug-in activation */ public void start(BundleContext context) throws Exception { super.start(context); } /** * This method is called when the plug-in is stopped */ public void stop(BundleContext context) throws Exception { super.stop(context); plugin = null; } /** * Returns the shared instance. */ public static Plugin getDefault() { return plugin; } /** * Adds the specified message into the plugin's log as a warning. * * @param message a string containing a message to log as a warning */ public void logWarning( String message ) { getLog().log( new Status(Status.WARNING, getBundle().getSymbolicName(), 0, message, null) ); } /** * Adds the specified message into the plugin's log as an error. * * @param message a string containing a message to log as an error */ public void logError( String message ) { getLog().log( new Status(Status.ERROR, getBundle().getSymbolicName(), 0, message, null) ); } /** * Adds the specified throwable object into the plugin's log as an error. * * @param throwable a throwable instance to log */ public static void log( Throwable throwable ) { plugin.getLog().log( new Status(Status.ERROR, plugin.getBundle().getSymbolicName(), 0, "Exception caught. " + throwable.toString(), throwable) ); } } eclox/eclox.core/src/eclox/core/doxygen/0000755000076400007640000000000012166321431017630 5ustar willywillyeclox/eclox.core/src/eclox/core/doxygen/InvokeException.java0000644000076400007640000000165112166012446023613 0ustar willywilly/******************************************************************************* * Copyright (C) 2007, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; /** * Signals that something got wrong while trying to execute doxygen program. * * @author gbrocker */ public class InvokeException extends Exception { private static final long serialVersionUID = -4531804107557361202L; /** * Constructor * * @param cause references the cause */ InvokeException( Throwable cause ) { super( cause ); } } eclox/eclox.core/src/eclox/core/doxygen/RunException.java0000644000076400007640000000165412166012446023127 0ustar willywilly/******************************************************************************* * Copyright (C) 2007, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; /** * Signals that something got wrong while running doxygen. * * @author gbrocker */ public class RunException extends Exception { private static final long serialVersionUID = -694030339432059044L; /** * Constructor * * @param message a string containing the reson of the exception */ RunException( String message ) { super( message ); } } eclox/eclox.core/src/eclox/core/doxygen/BuildJob.java0000644000076400007640000003255312166012446022200 0ustar willywilly/******************************************************************************* * Copyright (C) 2003, 2006-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.OperationCanceledException; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.core.runtime.jobs.Job; import eclox.core.Plugin; import eclox.core.doxyfiles.Doxyfile; /** * Implement a build job. * * @author Guillaume Brocker */ public class BuildJob extends Job { /** * Defines the doxygen not found error code */ public static final int ERROR_DOXYGEN_NOT_FOUND = 1; /** * Defines the pattern used to match doxygen warnings and errors */ private static final Pattern problemPattern = Pattern.compile("^(.+?):\\s*(\\d+)\\s*:\\s*(.+?)\\s*:\\s*(.*$(\\s+^ .*$)*)", Pattern.MULTILINE); /** * Defines the pattern used to match doxygen warnings about obsolete tags. */ private static final Pattern obsoleteTagWarningPattern = Pattern.compile("^Warning: Tag `(.+)' at line (\\d+) of file (.+) has become obsolete.$", Pattern.MULTILINE); /** * Implements a runnable log feeder that reads the given input stream * line per line and writes those lines back to the managed log. Once * the stream end has been reached, the feeder exists. * * @author Guillaume Brocker */ private class MyLogFeeder implements Runnable { /** * the input stream to read and write by to the log */ private InputStream input; /** * Constructor * * @param input the input stream to read to write back to the log */ public MyLogFeeder( InputStream input ) { this.input = input; } public void run() { try { BufferedReader reader = new BufferedReader( new InputStreamReader(input) ); String newLine; for(;;) { // Processes a new process output line. newLine = reader.readLine(); if( newLine != null ) { newLine = newLine.concat( "\n" ); log.append( newLine ); fireLogUpdated( newLine ); } else { break; } } } catch( Throwable t ) { Plugin.log( t ); } } } /** * Implements a resource change listener that will remove a given job if its * doxyfile gets deleted. * * @author Guillaume Brocker */ private class MyResourceChangeListener implements IResourceChangeListener { /** * the build job whose doxyfile will be monitored */ private BuildJob job; public MyResourceChangeListener( BuildJob job ) { this.job = job; } public void resourceChanged(IResourceChangeEvent event) { IResourceDelta doxyfileDelta = event.getDelta().findMember( job.getDoxyfile().getFullPath() ); if( doxyfileDelta != null && doxyfileDelta.getKind() == IResourceDelta.REMOVED ) { job.clearMarkers(); jobs.remove( job ); job.fireRemoved(); ResourcesPlugin.getWorkspace().removeResourceChangeListener( this ); } } } /** * a string that is used to identify the doxygen build job family */ public static String FAMILY = "Doxygen Build Job"; /** * a collection containing all created build jobs */ private static Collection jobs = new HashSet(); /** * the path of the doxyfile to build */ private IFile doxyfile; /** * the buffer containing the whole build output log */ private StringBuffer log = new StringBuffer(); /** * a set containing all registered build job listeners */ private Set listeners = new HashSet(); /** * a collection containing all markers corresponding to doxygen warning and errors */ private Collection markers = new Vector(); /** * Constructor. */ private BuildJob( IFile dxfile ) { super( "Doxygen Build ["+dxfile.getFullPath().toPortableString()+"]" ); doxyfile = dxfile; setPriority( Job.BUILD ); setUser(true); // References the jobs in the global collection and add a doxyfile listener. jobs.add( this ); ResourcesPlugin.getWorkspace().addResourceChangeListener( new MyResourceChangeListener(this), IResourceChangeEvent.POST_CHANGE ); } /** * Retrieves all doxygen build jobs. * * @return an arry containing all doxygen build jobs (can be empty). */ public static BuildJob[] getAllJobs() { return (BuildJob[]) jobs.toArray( new BuildJob[0] ); } /** * Retrieves the build job associated to the given doxyfile. If needed, * a new job will be created. * * @param doxyfile a given doxyfile instance * @param doxygen a string containing the doxygen command to use * * @return a build job that is in charge of building the given doxyfile */ public static BuildJob getJob( IFile doxyfile ) { BuildJob result = findJob( doxyfile ); // If no jobs has been found, then creates a new one. if( result == null ) { result = new BuildJob( doxyfile ); } // Job's done. return result; } /** * Searches for a build job associated to the given doxyfile. * * @param doxyfile a given doxyfile instance * * @return a build job for the given doxyfile or null if none */ public static BuildJob findJob( IFile doxyfile ) { BuildJob result = null; // Walks through the found jobs to find a relevant build job. Iterator i = jobs.iterator(); while( i.hasNext() ) { BuildJob buildJob = (BuildJob) i.next(); if( buildJob.getDoxyfile().equals(doxyfile) ) { result = buildJob; break; } } return result; } /** * Adds the given listener to the job. * * @param listener a given listener instance */ public void addBuidJobListener( IBuildJobListener listener ) { synchronized ( listeners ) { listeners.add( listener ); } } /** * Removes the given listener from the job. * * @param listener a given listener instance */ public void removeBuidJobListener( IBuildJobListener listener ) { synchronized( listeners ) { listeners.remove( listener ); } } /** * Clears the log and notifies attached listeners */ public void clearLog() { log.delete( 0, log.length() ); fireLogCleared(); } /** * Clears the markers managed by the build job. */ public void clearMarkers() { // Removes all markers from their respective resource Iterator i = markers.iterator(); while( i.hasNext() ) { IMarker marker = (IMarker) i.next(); try { marker.delete(); } catch( Throwable t ) { Plugin.log( t ); } } // Clear the marker collection markers.clear(); } /** * Retrieves the doxyfile that is managed by the job. * * @return a file taht is the builded doxyfile */ public IFile getDoxyfile() { return doxyfile; } /** * Retrieves the job's whole log. * * @return a string containing the build job's log. */ public String getLog() { return log.toString(); } /** * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object) */ public boolean belongsTo(Object family) { if( family == FAMILY ) { return true; } else { return super.belongsTo( family ); } } /** * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor) */ protected IStatus run( IProgressMonitor monitor ) { try { // Initializes the progress monitor. monitor.beginTask( doxyfile.getFullPath().toString(), 6 ); // Clears log and markers. clearLog(); clearMarkers(); monitor.worked( 1 ); // Locks access to the doxyfile. getJobManager().beginRule( doxyfile, monitor ); // Creates the doxygen build process and log feeders. Process buildProcess = Doxygen.getDefault().build( getDoxyfile() ); Thread inputLogFeeder = new Thread( new MyLogFeeder(buildProcess.getInputStream()) ); Thread errorLogFeeder = new Thread( new MyLogFeeder(buildProcess.getErrorStream()) ); // Wait either for the feeders to terminate or the user to cancel the job. inputLogFeeder.start(); errorLogFeeder.start(); for(;;) { // Tests of the log feeders have terminated. if( inputLogFeeder.isAlive() == false && errorLogFeeder.isAlive() == false ) { break; } // Tests if the jobs is supposed to terminate. if( monitor.isCanceled() == true ) { buildProcess.destroy(); buildProcess.waitFor(); getJobManager().endRule(doxyfile); return Status.CANCEL_STATUS; } // Allows other threads to run. Thread.yield(); } monitor.worked( 2 ); // Unlocks the doxyfile. getJobManager().endRule(doxyfile); // Builds error and warning markers createMarkers( monitor ); monitor.worked( 3 ); // Ensure that doxygen process has finished. buildProcess.waitFor(); monitor.worked( 4 ); // Refreshes the container that has received the documentation outputs. Doxyfile parsedDoxyfile = new Doxyfile(this.doxyfile); IContainer outputContainer = parsedDoxyfile.getOutputContainer(); if( outputContainer != null ) { outputContainer.refreshLocal( IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 1) ); } monitor.done(); // Job's done. return Status.OK_STATUS; } catch( OperationCanceledException e ) { getJobManager().endRule(doxyfile); return Status.CANCEL_STATUS; } catch( InvokeException e ) { getJobManager().endRule(doxyfile); return new Status( Status.WARNING, Plugin.getDefault().getBundle().getSymbolicName(), ERROR_DOXYGEN_NOT_FOUND, "Doxygen was not found.", e ); } catch( Throwable t ) { getJobManager().endRule(doxyfile); return new Status( Status.ERROR, Plugin.getDefault().getBundle().getSymbolicName(), 0, t.getMessage(), t ); } } /** * Creates resource markers while finding warning and errors in the * managed log. * * @param monitor the progress monitor used to watch for cancel requests. */ private void createMarkers( IProgressMonitor monitor ) throws CoreException { IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); Matcher matcher = null; // Searches documentation errors and warnings. matcher = problemPattern.matcher( log ); while( matcher.find() == true ) { Path resourcePath = new Path( matcher.group(1) ); Integer lineNumer = new Integer( matcher.group(2) ); int severity = Marker.toMarkerSeverity( matcher.group(3) ); String message = new String( matcher.group(4) ); IMarker marker = Marker.create( workspaceRoot.getFileForLocation(resourcePath), lineNumer.intValue(), message, severity ); if( marker != null ) { markers.add( marker ); } } matcher = null; // Searches obsolete tags warnings. matcher = obsoleteTagWarningPattern.matcher( log ); while( matcher.find() == true ) { String message = new String( matcher.group(0) ); String setting = new String( matcher.group(1) ); Integer lineNumer = new Integer( matcher.group(2) ); Path resourcePath = new Path( matcher.group(3) ); IMarker marker = Marker.create( workspaceRoot.getFileForLocation(resourcePath), setting, lineNumer.intValue(), message, IMarker.SEVERITY_WARNING ); if( marker != null ) { markers.add( marker ); } } matcher = null; } /** * Notifies observers that the log has been cleared. */ private void fireLogCleared() { synchronized ( listeners ) { Iterator i = listeners.iterator(); while( i.hasNext() ) { IBuildJobListener listener = (IBuildJobListener) i.next(); listener.buildJobLogCleared( this ); } } } /** * Notifies observers that the log has been updated with new text. * * @param newText a string containing the new text of the log */ private void fireLogUpdated( String newText ) { synchronized ( listeners ) { Iterator i = listeners.iterator(); while( i.hasNext() ) { IBuildJobListener listener = (IBuildJobListener) i.next(); listener.buildJobLogUpdated( this, newText ); } } } /** * Notifies observers that the job has been removed. */ private void fireRemoved() { synchronized ( listeners ) { Iterator i = listeners.iterator(); while( i.hasNext() ) { IBuildJobListener listener = (IBuildJobListener) i.next(); listener.buildJobRemoved( this ); } } } } eclox/eclox.core/src/eclox/core/doxygen/Doxygen.java0000644000076400007640000001430512166012446022116 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; import eclox.core.IPreferences; import eclox.core.Plugin; /** * Implements the abstract doxygen frontend. Sub-classes provides concret * doxygen access. * * @author gbrocker */ public abstract class Doxygen { /** * a string containing defining the default doxygen command to use */ protected final static String COMMAND_NAME = "doxygen"; /** * Retrieves the default doxygen instance to use. */ public static Doxygen getDefault() { final String identifier = Plugin.getDefault().getPluginPreferences().getString( IPreferences.DEFAULT_DOXYGEN ); Doxygen doxygen = null; // Try the creation of a default doxygen instance. doxygen = DefaultDoxygen.createFromIdentifier(identifier); if( doxygen != null ) { return doxygen; } // Try the creation of a custom doxygen instance. doxygen = CustomDoxygen.createFromIdentifier(identifier); if( doxygen != null ) { return doxygen; } // Try the creation of a bundled doxygen instance. doxygen = BundledDoxygen.createFromIdentifier(identifier); if( doxygen != null ) { return doxygen; } // No doxygen could be created. return null; } /** * Retrieves the version string of wrapped doxygen. * * @return a string containing the doxygen version string */ public String getVersion() { try { // Builds the command. String[] command = new String[2]; command[0] = getCommand(); command[1] = "--help"; // Runs the command and retrieves the version string. Process doxygen = Runtime.getRuntime().exec( command ); BufferedReader input = new BufferedReader( new InputStreamReader(doxygen.getInputStream()) ); BufferedReader error = new BufferedReader( new InputStreamReader(doxygen.getErrorStream()) ); // Matches the doxygen welcome message. Pattern pattern = Pattern.compile( "^doxygen\\s+version\\s+([\\d\\.]+).*", Pattern.CASE_INSENSITIVE|Pattern.DOTALL ); Matcher matcher = pattern.matcher( input.readLine() ); if( matcher.matches() ) { return matcher.group( 1 ); } else { String errorMessage = new String(); String line; while( (line = error.readLine()) != null ) { errorMessage = errorMessage.concat(line); } throw new RuntimeException( "Unable to get doxygen version. " + errorMessage ); } } catch( Throwable t ) { Plugin.log( t ); return null; } } /** * Launch a documentation build. * * @param file the file representing the doxygen configuration to use for the build * * @return The process that run the build. */ public Process build( IFile file ) throws InvokeException, RunException { if( file.exists() == false ) { throw new RunException("Missing or bad doxyfile"); } try { String[] command = new String[3]; command[0] = getCommand(); command[1] = "-b"; command[2] = file.getLocation().makeAbsolute().toOSString(); // TODO This is code only supported by jre >= 1.5 // ProcessBuilder processBuilder = new ProcessBuilder( command ); // processBuilder.directory( getDir(file).toFile() ); // processBuilder.redirectErrorStream( true ); // return processBuilder.start(); return Runtime.getRuntime().exec( command, null, getDir(file).toFile() ); } catch(IOException ioException) { throw new InvokeException(ioException); } } /** * Generate an empty configuration file. * * @param file the configuration file to generate. */ public void generate( IFile file ) throws InvokeException, RunException { try { Process process; String[] command = new String[3]; // Build the command. command[0] = getCommand(); command[1] = "-g"; command[2] = file.getLocation().toOSString(); // Run the command and check for errors. process = Runtime.getRuntime().exec( command, null ); if(process.waitFor() != 0) { BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String errorMsg = new String(); String line; for(line=reader.readLine(); line != null; line=reader.readLine()) { errorMsg = errorMsg.concat(line); } throw new RunException( errorMsg ); } // Force some refresh to display the file. file.refreshLocal( 0, null ); } catch( RunException runException ) { throw runException; } catch( SecurityException securityException ) { throw new InvokeException(securityException); } catch( IOException ioException ) { throw new InvokeException(ioException); } catch( Throwable throwable ) { Plugin.log(throwable); } } /** * Retrieves the string containing the command line to the doxygen binary. * Sub-classes must implement this method. * * @return a string containing the path to the doxygen binary file */ public abstract String getCommand(); /** * Retrieves the description string of the doxygen wrapper instance. * * @return a string containing the description of the dowygen wrapper */ public abstract String getDescription(); /** * Retrieves the identifier of the doxygen wrapper. * * @return a string containing the doxygen wrapper identifier */ public abstract String getIdentifier(); /** * Retrieve the diretory of the specified file. * * @param file The file for which the directory must be retrieved. * * @return The path of the containing directory. */ private static IPath getDir( IFile file ) { return file.getLocation().makeAbsolute().removeLastSegments( 1 ); } } eclox/eclox.core/src/eclox/core/doxygen/BundledDoxygen.java0000644000076400007640000000705112166012446023414 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; import java.net.URL; import java.util.Collection; import java.util.Vector; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import eclox.core.Plugin; public final class BundledDoxygen extends Doxygen { private URL location; /** * Retrieves all available bundled doxygen binaries. * * @return a collection with all collected bundled doxygen wrappers */ public static Collection getAll() { Collection doxygens = new Vector(); IExtensionRegistry registry = Platform.getExtensionRegistry(); IExtensionPoint point = registry.getExtensionPoint("org.gna.eclox.core.doxygen"); IExtension[] extensions = point.getExtensions(); for (int i = 0; i < extensions.length; i++) { IExtension extension = extensions[i]; IConfigurationElement[] elements = extension.getConfigurationElements(); for (int j = 0; j < elements.length; j++) { final String arch = elements[j].getAttribute("arch"); final String os = elements[j].getAttribute("os"); if( Platform.getOS().equals(os) && Platform.getOSArch().equals(arch) ) { final Path path = new Path( elements[j].getAttribute("path") ); URL url = FileLocator.find(Plugin.getDefault().getBundle(), path, null); if( url != null ) { doxygens.add( new BundledDoxygen(url) ); } else { Plugin.getDefault().logError( path.toString() + ": not a valid doxygen path." ); } } } } return doxygens; } /** * Creates a bundled doxygen instance from the given identifier * * @param identifier a string containing an identifier * * @return a new bundled doxygen wrapper */ public static BundledDoxygen createFromIdentifier( final String identifier ) { BundledDoxygen doxygen = null; if( identifier.startsWith( BundledDoxygen.class.getName() ) ) { final String location = identifier.substring( identifier.indexOf(' ') + 1 ); try { doxygen = new BundledDoxygen( new URL(location) ); } catch( Throwable t ) { Plugin.log( t ); doxygen = null; } } return doxygen; } /** * @see eclox.core.doxygen.Doxygen#getCommand() */ public String getCommand() { try { return FileLocator.resolve( location ).getPath(); } catch( Throwable t ) { Plugin.log(t); return null; } } /** * @see eclox.core.doxygen.Doxygen#getDescription() */ public String getDescription() { return new String(); } /** * @see eclox.core.doxygen.Doxygen#getIdentifier() */ public String getIdentifier() { return this.getClass().getName() + " " + location; } /** * Constructor * * @param location an url giving the location a doxygen binary */ private BundledDoxygen( URL location ) { this.location = location; assert( location != null ); } } eclox/eclox.core/src/eclox/core/doxygen/CustomDoxygen.java0000644000076400007640000000534312166012446023313 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; import java.io.File; /** * Implements a custom doxygen interpreter that will wrap a locally installed * version of doxygen. * * @author Guillaume Brocker */ public final class CustomDoxygen extends Doxygen { /** * a string containing the location where doxygen should available * * This can be either a path to a directory or the full path to the * doxygen binary executable file. */ private String location; /** * Builds a custom doxygen instance from the given identifier * * @param identifier a custom doxygen wrapper identifier * * @return a new custom doxygen wrapper instance or null on error */ public static CustomDoxygen createFromIdentifier( final String identifier ) { CustomDoxygen doxygen = null; if( identifier.startsWith( CustomDoxygen.class.getName() ) ) { final String location = identifier.substring( identifier.indexOf(' ') + 1 ); doxygen = new CustomDoxygen( location ); } return doxygen; } /** * Builds a local doxygen wrapper that uses the given path to search for doxygen. */ public CustomDoxygen( String location ) { this.location = new String( location ); assert( location != null ); assert( location.length() != 0 ); } /** * @see eclox.core.doxygen.Doxygen#getCommand() */ public String getCommand() { // Retrieves the real location where doxygen may be. File realLocation = new File( this.location ); // Builds the path. if( realLocation.isFile() == true ) { return realLocation.getPath(); } else { return realLocation.getPath() + File.separator + COMMAND_NAME; } } /** * @see eclox.core.doxygen.Doxygen#getDescription() */ public String getDescription() { return "Using location: '" + getLocation() + "'"; } /** * @see eclox.core.doxygen.Doxygen#getIdentifier() */ public String getIdentifier() { return this.getClass().getName() + " " + location; } /** * Retrieves the location of the custom doxygen. */ public String getLocation() { return new String(this.location); } /** * Updates the location of the custom doxygen. */ public void setLocation( String location ) { this.location = new String(location); } } eclox/eclox.core/src/eclox/core/doxygen/IBuildJobListener.java0000644000076400007640000000247112166012446024013 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; /** * Defines the interface for objects wanting to receives notifcations * about doxygen build jobs. * * @author gbrocker */ public interface IBuildJobListener { /** * Notifies that the job build log has changed. * * @param job the build job that raised the notification * @param output a string containing the new output from doxygen */ void buildJobLogUpdated( BuildJob job, String output ); /** * Notifies that the build job log has been cleared. * * @param job the build job that raised the notification */ void buildJobLogCleared( BuildJob job ); /** * Notifies that the given build job has been removed. * * @param job the build job that raised the notification */ void buildJobRemoved( BuildJob job ); } eclox/eclox.core/src/eclox/core/doxygen/Marker.java0000644000076400007640000000646512166012446021732 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2008, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.CoreException; /** * Defines some constant used with markers resulting from a build. * * @author gbrocker */ public class Marker { private static final String SEVERITY_WARNING = "warning"; ///< Defines the warning severity string. private static final String SEVERITY_ERROR = "error"; ///< Defines the warning severity string. public static final String DOXYGEN_MARKER = "org.gna.eclox.core.doxygen.marker"; ///< Defines the doxygen marker type attribute name public static final String SETTING = "org.gna.org.core.doxygen.marker.setting"; ///< Defines the optional attribute name that hold the name of a setting /** * Creates a single marker for the given file. * * If @c file is null, no marker will be created. * * @param file a resource file to create a marker for * @param line a line number * @param message a message explaining the problem * @param severity a severity level */ public static IMarker create( IFile file, int line, String message, int severity ) throws CoreException { IMarker marker = null; if( file != null ) { marker = file.createMarker( Marker.DOXYGEN_MARKER ); marker.setAttribute( IMarker.MESSAGE, message ); marker.setAttribute( IMarker.LINE_NUMBER, line ); marker.setAttribute( IMarker.LOCATION, file.getProjectRelativePath().toPortableString() ); marker.setAttribute( IMarker.PRIORITY, IMarker.PRIORITY_NORMAL ); marker.setAttribute( IMarker.SEVERITY, severity ); } return marker; } /** * Creates a single marker for the given file. * * If @c file is null, no marker will be created. * * @param file a resource file to create a marker for * @param setting a string containing the name of a setting * @param line a line number * @param message a message explaining the problem * @param severity a severity level */ public static IMarker create( IFile file, String setting, int line, String message, int severity ) throws CoreException { IMarker marker = create( file, line, message, severity ); if( marker != null ) { marker.setAttribute( SETTING, setting); } return marker; } /** * Retrieves the marker severity from the given text. The given * text may be warning or error. * * @param severity a string to convert to a marker severity * * @return the marker severity value */ public static int toMarkerSeverity( String severity ) { if( severity.compareToIgnoreCase(SEVERITY_ERROR) == 0 ) { return IMarker.SEVERITY_ERROR; } else if( severity.compareToIgnoreCase(SEVERITY_WARNING) == 0 ) { return IMarker.SEVERITY_WARNING; } else { return IMarker.SEVERITY_ERROR; } } } eclox/eclox.core/src/eclox/core/doxygen/DefaultDoxygen.java0000644000076400007640000000274712166012446023432 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.doxygen; /** * Implements the doxygen wrapper that use the eventual doxygen program reachable * in the default path. * * @author gbrocker */ public class DefaultDoxygen extends Doxygen { /** * Creates a new default doxygen instance from the given identifier. * * @param identifier a string containing an identifier * * @return a new default doxygen instance or null when creation failed */ public static DefaultDoxygen createFromIdentifier( final String identifier ) { if( DefaultDoxygen.class.getName().equalsIgnoreCase( identifier ) ) { return new DefaultDoxygen(); } else { return null; } } /** * @see eclox.core.doxygen.Doxygen#getCommand() */ public String getCommand() { return COMMAND_NAME; } /** * @see eclox.core.doxygen.Doxygen#getDescription() */ public String getDescription() { return new String(); } public String getIdentifier() { return getClass().getName(); } } eclox/eclox.core/src/eclox/core/ui/0000755000076400007640000000000012166321431016570 5ustar willywillyeclox/eclox.core/src/eclox/core/ui/build_co.gif0000644000076400007640000000027010642715532021044 0ustar willywillyGIF89a  J#J"K"L#M$RZ80]UXV`OgQoMrTxlvajҨТװܴ! , 5y$)R:VA%lTc L! a$eEvE!;eclox/eclox.core/src/eclox/core/ui/DoxyfileDecorator.java0000644000076400007640000001032512166012446023065 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.ui; import java.util.Collection; import java.util.Iterator; import java.util.Vector; import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.IDecoration; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ILightweightLabelDecorator; import org.eclipse.jface.viewers.LabelProviderChangedEvent; import eclox.core.doxyfiles.Doxyfile; import eclox.core.doxygen.BuildJob; public class DoxyfileDecorator implements ILightweightLabelDecorator { /** * Implements a job change listener */ /** * @author gbrocker * */ private class MyJobListener extends JobChangeAdapter { /** * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent) */ public void done(IJobChangeEvent event) { Job job = event.getJob(); if( job.belongsTo(BuildJob.FAMILY) ) { BuildJob buildJob = (BuildJob) job; fireProviderChangedEvent( buildJob.getDoxyfile() ); } } /** * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#running(org.eclipse.core.runtime.jobs.IJobChangeEvent) */ public void running(IJobChangeEvent event) { Job job = event.getJob(); if( job.belongsTo(BuildJob.FAMILY) ) { BuildJob buildJob = (BuildJob) job; fireProviderChangedEvent( buildJob.getDoxyfile() ); } } } /** * the collection of attached listeners */ private Collection listeners = new Vector(); /** * the job listener */ private MyJobListener jobManagerListener = new MyJobListener(); /** * Constructor */ public DoxyfileDecorator() { Job.getJobManager().addJobChangeListener(jobManagerListener); } /** * @see org.eclipse.jface.viewers.ILightweightLabelDecorator#decorate(java.lang.Object, org.eclipse.jface.viewers.IDecoration) */ public void decorate(Object element, IDecoration decoration) { if( Doxyfile.isDoxyfile(element) ) { IFile doxyfile = (IFile) element; BuildJob job = BuildJob.findJob(doxyfile); if( job != null && job.getState() == BuildJob.RUNNING ) { decoration.addOverlay( ImageDescriptor.createFromFile(this.getClass(), "build_co.gif"), IDecoration.BOTTOM_LEFT ); decoration.addSuffix(" (building...)"); } } } /** * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) */ public void addListener(ILabelProviderListener listener) { listeners.add(listener); } /** * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() */ public void dispose() { Job.getJobManager().removeJobChangeListener(jobManagerListener); } /** * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String) */ public boolean isLabelProperty(Object element, String property) { return false; } /** * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener) */ public void removeListener(ILabelProviderListener listener) { listeners.remove(listener); } /** * Notifies listerners that the given resource'l decoration need to be updated * * @param resource a resource to refresh */ private void fireProviderChangedEvent( Object resource ) { Iterator i = listeners.iterator(); LabelProviderChangedEvent event = new LabelProviderChangedEvent(this, resource); while( i.hasNext() ) { ILabelProviderListener listener = (ILabelProviderListener) i.next(); listener.labelProviderChanged(event); } } } eclox/eclox.core/src/eclox/core/ui/PreferencePage.java0000644000076400007640000000443112166012446022313 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2007, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.ui; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.preferences.ScopedPreferenceStore; import eclox.core.Plugin; /** * Implements the preferences for the core eclox plug-in. * * @author gbrocker */ public class PreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { public static final String ID = "eclox.core.PreferencePage"; ///< Holds the identifier of the property page. public PreferencePage() { super( GRID ); } /** * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) */ public void init(IWorkbench workbench) { setPreferenceStore( new ScopedPreferenceStore( new InstanceScope(), Plugin.getDefault().getBundle().getSymbolicName() ) ); } /** * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors() */ protected void createFieldEditors() { // Creates all control instances. Label doxygenLabel = new Label( getFieldEditorParent(), SWT.WRAP ); DefaultDoxygenFieldEditor doxygen = new DefaultDoxygenFieldEditor( getFieldEditorParent() ); // Configures field editors. addField( doxygen ); // Configures the default doxygen label. GridData doxygenLabelData = new GridData(); doxygenLabelData.horizontalSpan = 3; doxygenLabelData.horizontalAlignment = SWT.FILL; doxygenLabel.setText( "Choose among available doxygen versions, the one you would like to use." ); doxygenLabel.setLayoutData( doxygenLabelData ); } } eclox/eclox.core/src/eclox/core/ui/DefaultDoxygenFieldEditor.java0000644000076400007640000003316012166012446024476 0ustar willywilly/******************************************************************************* * Copyright (C) 2003-2006, 2013, Guillaume Brocker * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Guillaume Brocker - Initial API and implementation * ******************************************************************************/ package eclox.core.ui; import java.util.Collection; import java.util.Iterator; import java.util.Vector; import org.eclipse.jface.preference.FieldEditor; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.PlatformUI; import eclox.core.IPreferences; import eclox.core.Plugin; import eclox.core.doxygen.BundledDoxygen; import eclox.core.doxygen.CustomDoxygen; import eclox.core.doxygen.DefaultDoxygen; import eclox.core.doxygen.Doxygen; /** * @author Guillaume Brocker */ public class DefaultDoxygenFieldEditor extends FieldEditor { /** * defines the version column index */ private final int VERSION_COLUMN_INDEX = 0; /** * defines the type column index */ private final int TYPE_COLUMN_INDEX = 1; /** * defines the description column index */ private final int DESCRIPTION_COLUMN_INDEX = 2; /** * the table control showing available doxygen wrappers */ private Table table; /** * the composite containing all buttons */ private Composite buttons; /** * the button that triggers the addition of a custom doxygen */ private Button add; /** * the button that triggers the edition of a custom doxygen */ private Button edit; /** * the button that triggers the removal of a custom doxygen */ private Button remove; /** * the valid state of the field editor */ private boolean valid = true; /** * Implements a selection listener for the owned table control. * * It is reponsible to ensure that only one table item is selected at a time * and it also fires value change notifications. */ private class MySelectionListener implements SelectionListener { /** * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetDefaultSelected(SelectionEvent e) { widgetSelected( e ); } /** * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { if (e.item instanceof TableItem ) onItemSelected( (TableItem) e.item ); else if (e.getSource() == add ) onAddSelected(); else if (e.getSource() == edit) onEditSelected(); else if (e.getSource() == remove) onRemoveSelected(); } } /** * Adds a new table item for the given doxygen instance */ private void addItem( Doxygen doxygen ) { TableItem item = new TableItem( table, 0 ); item.setData( doxygen ); updateItem( item ); } /** * Retrieves the type of the given doxygen wrapper instance */ private static String getDoxygenType( final Doxygen doxygen ) { if ( doxygen instanceof DefaultDoxygen ) return "Default"; else if ( doxygen instanceof CustomDoxygen ) return "Custom"; else if ( doxygen instanceof BundledDoxygen ) return "Bundled"; else return "Uknown"; } /** * Updates the given table item. */ private void updateItem( TableItem item ) { // Item data preparation. final Doxygen doxygen = (Doxygen) item.getData(); final String type = getDoxygenType( doxygen ); final String version = doxygen.getVersion(); final String description = doxygen.getDescription(); // Updates the item properties. item.setImage( (version == null) ? PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK) : null ); item.setText( VERSION_COLUMN_INDEX, (version == null) ? "unknown" : version ); item.setText( TYPE_COLUMN_INDEX, type ); item.setText( DESCRIPTION_COLUMN_INDEX, description ); // Updates the table layout. table.getColumn( VERSION_COLUMN_INDEX ).pack(); table.getColumn( TYPE_COLUMN_INDEX ).pack(); table.getColumn( DESCRIPTION_COLUMN_INDEX ).pack(); table.layout(); } /** * Checkes the table item representing the given doxygen identifier. */ private void checkItem( final String identifier ) { TableItem[] items = table.getItems(); for( int i = 0; i < items.length; ++i ) { Doxygen current = (Doxygen) items[i].getData(); items[i].setChecked( current.getIdentifier().equalsIgnoreCase( identifier ) ); } } /** * Retrieves checked items. * * @return the checked item or null if none */ private TableItem[] getCheckedItems() { // Pre-condition assert( table != null ); Vector checked = new Vector(); TableItem[] items = table.getItems(); for( int i = 0; i < items.length; ++i ) { if( items[i].getChecked() == true ) { checked.add( items[i] ); } } return (TableItem[]) checked.toArray( new TableItem[0] ); } /** * Process the click on the add button. */ private void onAddSelected() { // Asks the user to select a location containing a doxygen binary. DirectoryDialog dialog = new DirectoryDialog( getPage().getShell() ); String directory = null; dialog.setMessage( "Select a location containing doxygen." ); dialog.setText( "Add Custom Doxygen" ); directory = dialog.open(); // Creates the new wrapper. if( directory != null ) { addItem( new CustomDoxygen( directory ) ); } } /** * Process the click on the edit button */ private void onEditSelected() { // Pre-condition assert( table != null ); // Retrieves the checked items TableItem[] selected = table.getSelection(); // Retrieves the doxygen wrapper associated to the selected item assert( selected.length == 1 ); Doxygen doxygen = (Doxygen) selected[0].getData(); // Asks the user to select a location containing a doxygen binary. assert( doxygen instanceof CustomDoxygen ); CustomDoxygen customDoxygen = (CustomDoxygen) doxygen; DirectoryDialog dialog = new DirectoryDialog( getPage().getShell() ); String directory = null; dialog.setMessage( "Select a new location containing doxygen." ); dialog.setText( "Edit Custom Doxygen" ); dialog.setFilterPath( customDoxygen.getLocation() ); directory = dialog.open(); // Creates the new wrapper. if( directory != null ) { customDoxygen.setLocation( directory ); updateItem( selected[0] ); } } /** * Process the click on the remove button */ private void onRemoveSelected() { // Pre-condition assert( table != null ); table.remove( table.getSelectionIndex() ); refreshValidState(); } /** * Process the selection of the given table item. */ private void onItemSelected( TableItem item ) { if( item.getChecked() == true ) { TableItem[] checked = getCheckedItems(); // Updates chekced items so that only one is chekced at the same time. for( int i = 0; i < checked.length; ++i ) { if( checked[i] != item ) { checked[i].setChecked( false ); } } // Selects the item that has been checked. table.setSelection( table.indexOf(item) ); // TODO only supported in eclipse 3.2 // table.setSelection( item ); // Fires some notifications. fireValueChanged( VALUE, null, null ); } // Updates button states final boolean enable = item.getData() instanceof CustomDoxygen; edit.setEnabled( enable ); remove.setEnabled( enable ); // Refreshes the field validity. refreshValidState(); } /** * @see org.eclipse.jface.preference.FieldEditor#adjustForNumColumns(int) */ protected void adjustForNumColumns(int numColumns) { // Pre-condition assert( table != null ); GridData tableData = (GridData) table.getLayoutData(); GridData buttonsData = (GridData) buttons.getLayoutData(); tableData.horizontalSpan = numColumns - 1; buttonsData.horizontalSpan = 1; } /** * @see org.eclipse.jface.preference.FieldEditor#doFillIntoGrid(org.eclipse.swt.widgets.Composite, int) */ protected void doFillIntoGrid(Composite parent, int numColumns) { // Pre-condition assert( table == null ); // Creates the combo controls containing all available doxygen wrappers. GridData tableData = new GridData( GridData.FILL_BOTH ); table = new Table( parent, SWT.SINGLE|SWT.CHECK|SWT.BORDER|SWT.FULL_SELECTION ); tableData.horizontalSpan = numColumns - 1; table.setLayoutData( tableData ); table.addSelectionListener( new MySelectionListener() ); TableColumn versionColumn = new TableColumn( table, SWT.LEFT, VERSION_COLUMN_INDEX ); TableColumn typeColumn = new TableColumn( table, SWT.LEFT, TYPE_COLUMN_INDEX ); TableColumn descriptionColumn = new TableColumn( table, SWT.LEFT, DESCRIPTION_COLUMN_INDEX ); versionColumn.setText( "Version" ); typeColumn.setText( "Type" ); descriptionColumn.setText( "Description" ); table.setHeaderVisible( true ); // Creates the composite containing all buttons and located on the right side of the table. GridData buttonsData = new GridData( GridData.END ); FillLayout buttonsLayout = new FillLayout( SWT.VERTICAL ); buttons = new Composite( parent, SWT.NO_FOCUS ); buttonsData.horizontalSpan = 1; buttonsData.horizontalAlignment = SWT.FILL; buttons.setLayoutData( buttonsData ); buttonsLayout.spacing = 5; buttons.setLayout( buttonsLayout ); // Creates the button controlling custom doyxgen wrappers. add = new Button( buttons, SWT.PUSH ); edit = new Button( buttons, SWT.PUSH ); remove = new Button( buttons, SWT.PUSH ); add.setText( "Add..." ); add.addSelectionListener( new MySelectionListener() ); edit.setText( "Edit..." ); edit.addSelectionListener( new MySelectionListener() ); edit.setEnabled( false ); remove.setText( "Remove" ); remove.addSelectionListener( new MySelectionListener() ); remove.setEnabled( false ); } /** * @see org.eclipse.jface.preference.FieldEditor#doLoad() */ protected void doLoad() { // Adds default doxygen instance. addItem( new DefaultDoxygen() ); // Adds custom doxygens. final String raw = getPreferenceStore().getString( IPreferences.CUSTOM_DOXYGENS ); final String[] splitted = raw.split( "\n"); for( int i = 0; i < splitted.length; ++i ) { CustomDoxygen doxygen = CustomDoxygen.createFromIdentifier( splitted[i] ); if( doxygen != null ) { addItem( doxygen ); } else { Plugin.getDefault().logError( splitted[i] + ": invalid custom doxygen identifier found." ); } } // Adds bundled doxygens. Collection bundled = BundledDoxygen.getAll(); Iterator i = bundled.iterator(); while( i.hasNext() ) { addItem( (Doxygen) i.next() ); } // Select the default doxygen wrapper checkItem( getPreferenceStore().getString( IPreferences.DEFAULT_DOXYGEN ) ); } /** * @see org.eclipse.jface.preference.FieldEditor#doLoadDefault() */ protected void doLoadDefault() { // Adds default doxygen instance. addItem( new DefaultDoxygen() ); // Select the default doxygen wrapper checkItem( getPreferenceStore().getDefaultString( IPreferences.DEFAULT_DOXYGEN ) ); } /** * @see org.eclipse.jface.preference.FieldEditor#doStore() */ protected void doStore() { // Pre-condition assert( table != null ); // Saves all custom doxygen wrappers. TableItem[] items = table.getItems(); String serialized = new String(); for( int i = 0; i < items.length; ++i ) { Object itemData = items[i].getData(); if( itemData instanceof CustomDoxygen ) { CustomDoxygen doxygen = (CustomDoxygen) itemData; serialized = serialized.concat( doxygen.getIdentifier() ); serialized = serialized.concat( "\n" ); } } getPreferenceStore().setValue( IPreferences.CUSTOM_DOXYGENS, serialized ); // Saves the checked item. TableItem[] checked = getCheckedItems(); String defaultDoxygen = new String(); if( checked.length == 1 ) { Doxygen doxygen = (Doxygen) checked[0].getData(); defaultDoxygen = doxygen.getIdentifier(); } getPreferenceStore().setValue( IPreferences.DEFAULT_DOXYGEN, defaultDoxygen ); } /** * @see org.eclipse.jface.preference.FieldEditor#refreshValidState() */ protected void refreshValidState() { TableItem[] checked = getCheckedItems(); boolean oldValid = valid; boolean newValid = checked.length == 1; // Updates validity and error message. valid = newValid; if( valid == false ) { showErrorMessage( "Select the doxygen version to use." ); } else { clearErrorMessage(); } // Send some notifications. if( newValid != oldValid ) { fireStateChanged( IS_VALID, oldValid, newValid ); } } /** * Constructor */ public DefaultDoxygenFieldEditor( Composite parent ) { super( IPreferences.DEFAULT_DOXYGEN, "Doxygen:", parent ); } /** * @see org.eclipse.jface.preference.FieldEditor#getNumberOfControls() */ public int getNumberOfControls() { return 2; } /** * @see org.eclipse.jface.preference.FieldEditor#isValid() */ public boolean isValid() { return valid; } /** * @see org.eclipse.jface.preference.FieldEditor#setFocus() */ public void setFocus() { super.setFocus(); table.setFocus(); } } eclox/eclox.core/schema/0000755000076400007640000000000012166321431014562 5ustar willywillyeclox/eclox.core/schema/doxygen.exsd0000644000076400007640000000740210601521246017125 0ustar willywilly Allows third-party components to provide doxygen binaries. Declares a bundled doxygen binary. Specifies the plugin (or fragment) relative path to the provided doxygen binary. Specifies the targeted hardware architecture. Specifies the target operating system. 0.6.0 [Enter extension point usage example here.] [Enter API information here.] [Enter information about supplied implementation of this extension point.] eclox/eclox.core/plugin.xml0000644000076400007640000000352110601517167015350 0ustar willywilly Shows when doxygen is building a given doxyfile. eclox/eclox.core/misc/0000755000076400007640000000000012166321431014255 5ustar willywillyeclox/eclox.core/misc/setting-properties.txt0000644000076400007640000021215610700715724020700 0ustar willywilly# This file provides additionnal properties to the items of a doxyfile. # # eclox #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING.text = Doxyfile Encoding DOXYFILE_ENCODING.group = Project DOXYFILE_ENCODING.type = text DOXYFILE_ENCODING.note =

This tag specifies the encoding used for all characters in the config file that follow.

The default is UTF-8 which is also the encoding used for all text before the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of possible encodings.

PROJECT_NAME.text = Project Name PROJECT_NAME.group = Project PROJECT_NAME.type = text PROJECT_NAME.note = The PROJECT_NAME tag is a single word (or a sequence of words surrounded by quotes) that should identify the project. PROJECT_NUMBER.text = Project Number PROJECT_NUMBER.group = Project PROJECT_NUMBER.type = text PROJECT_NUMBER.note = The PROJECT_NUMBER tag can be used to enter a project or revision number. This could be handy for archiving the generated documentation or if some version control system is used. OUTPUT_DIRECTORY.text = Output Directory OUTPUT_DIRECTORY.group = Project OUTPUT_DIRECTORY.type = directory OUTPUT_DIRECTORY.note =

The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) base path where the generated documentation will be put.

If a relative path is entered, it will be relative to the location where doxygen was started. If left blank the current directory will be used.

CREATE_SUBDIRS.text = Create Subdirectories CREATE_SUBDIRS.group = Project CREATE_SUBDIRS.type = boolean CREATE_SUBDIRS.note =

If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-directories (in 2 levels) under the output directory of each output format and will distribute the generated files over these directories.

Enabling this option can be useful when feeding doxygen a huge amount of source files, where putting all generated files in the same directory would otherwise cause performance problems for the file system.

OUTPUT_LANGUAGE.text = Output Language OUTPUT_LANGUAGE.group = Project OUTPUT_LANGUAGE.type = text OUTPUT_LANGUAGE.note =

The OUTPUT_LANGUAGE tag is used to specify the language in which all documentation generated by doxygen is written.

Doxygen will use this information to generate all constant output in the proper language. The default language is English, other supported languages are: Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.

USE_WINDOWS_ENCODING.text = Use Windows Encoding USE_WINDOWS_ENCODING.group = Project USE_WINDOWS_ENCODING.type = boolean USE_WINDOWS_ENCODING.note =

This tag can be used to specify the encoding used in the generated output.

The encoding is not always determined by the language that is chosen, but also whether or not the output is meant for Windows or non-Windows users. In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES forces the Windows encoding (this is the default for the Windows binary), whereas setting the tag to NO uses a Unix-style encoding (the default for all platforms other than Windows).

BRIEF_MEMBER_DESC.text = Brief Member Description BRIEF_MEMBER_DESC.group = Project BRIEF_MEMBER_DESC.type = boolean BRIEF_MEMBER_DESC.note = If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will include brief member descriptions after the members that are listed in the file and class documentation (similar to JavaDoc). Set to NO to disable this. REPEAT_BRIEF.text = Repeat Brief Description REPEAT_BRIEF.group = Project REPEAT_BRIEF.type = boolean REPEAT_BRIEF.note =

If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend the brief description of a member or function before the detailed description.

Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the brief descriptions will be completely suppressed.

ABBREVIATE_BRIEF.text = Abbreviate Brief Description ABBREVIATE_BRIEF.group = Project ABBREVIATE_BRIEF.note =

This tag implements a quasi-intelligent brief description abbreviator that is used to form the text in various listings.

Each string in this list, if found as the leading text of the brief description, will be stripped from the text and the result after processing the whole list, is used as the annotated text. Otherwise, the brief description is used as-is.

If left blank, the following values are used ("$name" is automatically replaced with the name of the entity): "The $name class" "The $name widget" "The $name file" "is" "provides" "specifies" "contains" "represents" "a" "an" "the"

ALWAYS_DETAILED_SEC.text = Always Detailed Section ALWAYS_DETAILED_SEC.group = Project ALWAYS_DETAILED_SEC.type = boolean ALWAYS_DETAILED_SEC.note = If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then Doxygen will generate a detailed section even if there is only a brief description. INLINE_INHERITED_MEMB.text = Inline Inherited Members INLINE_INHERITED_MEMB.group = Project INLINE_INHERITED_MEMB.type = boolean INLINE_INHERITED_MEMB.note =

If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited members of a class in the documentation of that class as if those members were ordinary class members.

Constructors, destructors and assignment operators of the base classes will not be shown.

FULL_PATH_NAMES.text = Full Path Names FULL_PATH_NAMES.group = Project FULL_PATH_NAMES.type = boolean FULL_PATH_NAMES.note = If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full path before files name in the file list and in the header files. If set to NO the shortest path that makes the file name unique will be used. STRIP_FROM_PATH.text = Strip From Path STRIP_FROM_PATH.group = Project STRIP_FROM_PATH.note =

If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.

Stripping is only done if one of the specified strings matches the left-hand part of the path. The tag can be used to show relative paths in the file list. If left blank the directory from which doxygen is run is used as the path to strip.

STRIP_FROM_INC_PATH.text = Strip From Include Path STRIP_FROM_INC_PATH.group = Project STRIP_FROM_INC_PATH.note =

The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the path mentioned in the documentation of a class, which tells the reader which header file to include in order to use a class.

If left blank only the name of the header file containing the class definition is used. Otherwise one should specify the include paths that are normally passed to the compiler using the -I flag.

SHORT_NAMES.text = Short Names SHORT_NAMES.group = Project SHORT_NAMES.type = boolean SHORT_NAMES.note = If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but less readable) file names. This can be useful is your file systems doesn't support long names like on DOS, Mac, or CD-ROM. JAVADOC_AUTOBRIEF.text = JavaDoc Autobrief JAVADOC_AUTOBRIEF.group = Project JAVADOC_AUTOBRIEF.type = boolean JAVADOC_AUTOBRIEF.note = If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen will interpret the first line (until the first dot) of a JavaDoc-style comment as the brief description. If set to NO, the JavaDoc comments will behave just like the Qt-style comments (thus requiring an explicit @brief command for a brief description. QT_AUTOBRIEF.text = QT Autobrief QT_AUTOBRIEF.group = Project QT_AUTOBRIEF.type = boolean QT_AUTOBRIEF.note = If the QT_AUTOBRIEF tag is set to YES then Doxygen will interpret the first line (until the first dot) of a Qt-style comment as the brief description. If set to NO, the comments will behave just like regular Qt-style comments (thus requiring an explicit @brief command for a brief description.) MULTILINE_CPP_IS_BRIEF.text = Multiline C++ is Brief MULTILINE_CPP_IS_BRIEF.group = Project MULTILINE_CPP_IS_BRIEF.type = boolean MULTILINE_CPP_IS_BRIEF.note =

The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen treat a multi-line C++ special comment block (i.e. a block of //! or /// comments) as a brief description. This used to be the default behaviour.

The new default is to treat a multi-line C++ comment block as a detailed description. Set this tag to YES if you prefer the old behaviour instead.

DETAILS_AT_TOP.text = Details at Top DETAILS_AT_TOP.group = Project DETAILS_AT_TOP.type = boolean DETAILS_AT_TOP.note = If the DETAILS_AT_TOP tag is set to YES then Doxygen will output the detailed description near the top, like JavaDoc.If set to NO, the detailed description appears after the member documentation. INHERIT_DOCS.text = Inherit Documentations INHERIT_DOCS.group = Project INHERIT_DOCS.type = boolean INHERIT_DOCS.note = If the INHERIT_DOCS tag is set to YES (the default) then an undocumented member inherits the documentation from any documented member that it re-implements. DISTRIBUTE_GROUP_DOC.text = Distribute Group Documentation DISTRIBUTE_GROUP_DOC.group = Project DISTRIBUTE_GROUP_DOC.type = boolean DISTRIBUTE_GROUP_DOC.note = If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC tag is set to YES, then doxygen will reuse the documentation of the first member in the group (if any) for the other members of the group. By default all members of a group must be documented explicitly. SEPARATE_MEMBER_PAGES.text = Separate Member Pages SEPARATE_MEMBER_PAGES.group = Project SEPARATE_MEMBER_PAGES.type = boolean SEPARATE_MEMBER_PAGES.note = If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a new page for each member. If set to NO, the documentation of a member will be part of the file/class/namespace that contains it. TAB_SIZE.text = Tabulation Size TAB_SIZE.group = Project TAB_SIZE.note = The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen uses this value to replace tabs by spaces in code fragments. ALIASES.text = Aliases ALIASES.group = Project ALIASES.type = text list ALIASES.note =

This tag can be used to specify a number of aliases that acts as commands in the documentation. An alias has the form "name=value".

For example adding "sideeffect=\par Side Effects:\n" will allow you to put the command \sideeffect (or @sideeffect) in the documentation, which will result in a user-defined paragraph with heading "Side Effects:". You can put \n's in the value part of an alias to insert newlines.

OPTIMIZE_OUTPUT_FOR_C.text = Optimize Ouput for C OPTIMIZE_OUTPUT_FOR_C.group = Project OPTIMIZE_OUTPUT_FOR_C.type = boolean OPTIMIZE_OUTPUT_FOR_C.note =

Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources only. Doxygen will then generate output that is more tailored for C.

For instance, some of the names that are used will be different. The list of all members will be omitted, etc.

OPTIMIZE_OUTPUT_JAVA.text = Optimize Output Java OPTIMIZE_OUTPUT_JAVA.group = Project OPTIMIZE_OUTPUT_JAVA.type = boolean OPTIMIZE_OUTPUT_JAVA.note =

Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources only. Doxygen will then generate output that is more tailored for Java.

For instance, namespaces will be presented as packages, qualified scopes will look different, etc.

BUILTIN_STL_SUPPORT.text = Built-in STL Support BUILTIN_STL_SUPPORT.group = Project BUILTIN_STL_SUPPORT.type = boolean BUILTIN_STL_SUPPORT.note =

If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to include (a tag file for) the STL sources as input, then you should set this tag to YES in order to let doxygen match functions declarations and definitions whose arguments contain STL classes (e.g. func(std::string); v.s. func(std::string) {}).

This also make the inheritance and collaboration diagrams that involve STL classes more complete and accurate.

CPP_CLI_SUPPORT.text = C++/CLI Support CPP_CLI_SUPPORT.group = Project CPP_CLI_SUPPORT.type = boolean CPP_CLI_SUPPORT.note = If you use Microsoft's C++/CLI language, you should set this option to YES to enable parsing support. DISTRIBUTE_GROUP_DOC.text = Distribute Group Documentation DISTRIBUTE_GROUP_DOC.group = Project DISTRIBUTE_GROUP_DOC.type = boolean DISTRIBUTE_GROUP_DOC.note =

If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC tag is set to YES, then doxygen will reuse the documentation of the first member in the group (if any) for the other members of the group.

By default all members of a group must be documented explicitly.

SUBGROUPING.text = Subgrouping SUBGROUPING.group = Project SUBGROUPING.type = boolean SUBGROUPING.note =

Set the SUBGROUPING tag to YES (the default) to allow class member groups of the same type (for instance a group of public functions) to be put as a subgroup of that type (e.g. under the Public Functions section). Set it to NO to prevent subgrouping.

Alternatively, this can be done per class using the @nosubgrouping command.

#--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL.text = Extract All EXTRACT_ALL.group = Build EXTRACT_ALL.type = boolean EXTRACT_ALL.note =

If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in documentation are documented, even if no documentation was available.

Private class members and static file members will be hidden unless the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES.

EXTRACT_PRIVATE.text = Extract Private EXTRACT_PRIVATE.group = Build EXTRACT_PRIVATE.type = boolean EXTRACT_PRIVATE.note = If the EXTRACT_PRIVATE tag is set to YES all private members of a class will be included in the documentation. EXTRACT_STATIC.text = Extract Static EXTRACT_STATIC.group = Build EXTRACT_STATIC.type = boolean EXTRACT_STATIC.note = If the EXTRACT_STATIC tag is set to YES all static members of a file will be included in the documentation. EXTRACT_LOCAL_CLASSES.text = Extract Local Classes EXTRACT_LOCAL_CLASSES.group = Build EXTRACT_LOCAL_CLASSES.type = boolean EXTRACT_LOCAL_CLASSES.note = If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined locally in source files will be included in the documentation. If set to NO only classes defined in header files are included. EXTRACT_LOCAL_METHODS.text = Extract Local Methods EXTRACT_LOCAL_METHODS.group = Build EXTRACT_LOCAL_METHODS.type = boolean EXTRACT_LOCAL_METHODS.note = This flag is only useful for Objective-C code. When set to YES local methods, which are defined in the implementation section but not in the interface are included in the documentation. If set to NO (the default) only methods in the interface are included. EXTRACT_ANON_NSPACES.text = Extract Anonymous Namespaces EXTRACT_ANON_NSPACES.group = Build EXTRACT_ANON_NSPACES.type = boolean EXTRACT_ANON_NSPACES.note =

If this flag is set to YES, the members of anonymous namespaces will be extracted and appear in the documentation as a namespace called 'anonymous_namespace{file}', where file will be replaced with the base name of the file that contains the anonymous namespace.

By default anonymous namespace are hidden.

HIDE_UNDOC_MEMBERS.text = Hide Undocumented Members HIDE_UNDOC_MEMBERS.group = Build HIDE_UNDOC_MEMBERS.type = boolean HIDE_UNDOC_MEMBERS.note =

If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all undocumented members of documented classes, files or namespaces. If set to NO (the default) these members will be included in the various overviews, but no documentation section is generated.

This option has no effect if EXTRACT_ALL is enabled.

HIDE_UNDOC_CLASSES.text = Hide Undocumented Classes HIDE_UNDOC_CLASSES.group = Build HIDE_UNDOC_CLASSES.type = boolean HIDE_UNDOC_CLASSES.note =

If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all undocumented classes that are normally visible in the class hierarchy. If set to NO (the default) these classes will be included in the various overviews.

This option has no effect if EXTRACT_ALL is enabled.

HIDE_FRIEND_COMPOUNDS.text = Hide Friend Compounds HIDE_FRIEND_COMPOUNDS.group = Build HIDE_FRIEND_COMPOUNDS.type = boolean HIDE_FRIEND_COMPOUNDS.note = If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all friend (class|struct|union) declarations. If set to NO (the default) these declarations will be included in the documentation. HIDE_IN_BODY_DOCS.text = Hide in Body Documentations HIDE_IN_BODY_DOCS.group = Build HIDE_IN_BODY_DOCS.type = boolean HIDE_IN_BODY_DOCS.note = If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any documentation blocks found inside the body of a function. If set to NO (the default) these blocks will be appended to the function's detailed documentation block. INTERNAL_DOCS.text = Internal Documentations INTERNAL_DOCS.group = Build INTERNAL_DOCS.type = boolean INTERNAL_DOCS.note = The INTERNAL_DOCS tag determines if documentation that is typed after a \internal command is included. If the tag is set to NO (the default) then the documentation will be excluded. Set it to YES to include the internal documentation. CASE_SENSE_NAMES.text = Case Sense Names CASE_SENSE_NAMES.group = Build CASE_SENSE_NAMES.type = boolean CASE_SENSE_NAMES.note =

If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate file names in lower-case letters. If set to YES upper-case letters are also allowed.

This is useful if you have classes or files whose names only differ in case and if your file system supports case sensitive file names. Windows and Mac users are advised to set this option to NO.

HIDE_SCOPE_NAMES.text = Hide Scope Names HIDE_SCOPE_NAMES.group = Build HIDE_SCOPE_NAMES.type = boolean HIDE_SCOPE_NAMES.note = If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen will show members with their full class and namespace scopes in the documentation. If set to YES the scope will be hidden. SHOW_INCLUDE_FILES.text = Show Include Files SHOW_INCLUDE_FILES.group = Build SHOW_INCLUDE_FILES.type = boolean SHOW_INCLUDE_FILES.note = If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen will put a list of the files that are included by a file in the documentation of that file. INLINE_INFO.text = Inline Info INLINE_INFO.group = Build INLINE_INFO.type = boolean INLINE_INFO.note = If the INLINE_INFO tag is set to YES (the default) then a tag [inline] is inserted in the documentation for inline members. SORT_MEMBER_DOCS.text = Sort Member Documentations SORT_MEMBER_DOCS.group = Build SORT_MEMBER_DOCS.type = boolean SORT_MEMBER_DOCS.note = If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen will sort the (detailed) documentation of file and class members alphabetically by member name. If set to NO the members will appear in declaration order. SORT_BRIEF_DOCS.text = Sort Brief Documentations SORT_BRIEF_DOCS.group = Build SORT_BRIEF_DOCS.type = boolean SORT_BRIEF_DOCS.note = If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief documentation of file, namespace and class members alphabetically by member name. If set to NO (the default) the members will appear in declaration order. SORT_BY_SCOPE_NAME.text = Sort by Scope Name SORT_BY_SCOPE_NAME.group = Build SORT_BY_SCOPE_NAME.type = boolean SORT_BY_SCOPE_NAME.note =

If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by fully-qualified names, including namespaces. If set to NO (the default), the class list will be sorted only by class name, not including the namespace part.

Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.

Note: This option applies only to the class list, not to the alphabetical list.

GENERATE_TODOLIST.text = Generate Todo List GENERATE_TODOLIST.group = Build GENERATE_TODOLIST.type = boolean GENERATE_TODOLIST.note = The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo list. This list is created by putting \todo commands in the documentation. GENERATE_TESTLIST.text = Generate Test List GENERATE_TESTLIST.group = Build GENERATE_TESTLIST.type = boolean GENERATE_TESTLIST.note = The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test list. This list is created by putting \test commands in the documentation. GENERATE_BUGLIST.text = Generate Bug List GENERATE_BUGLIST.group = Build GENERATE_BUGLIST.type = boolean GENERATE_BUGLIST.note = The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug list. This list is created by putting \bug commands in the documentation. GENERATE_DEPRECATEDLIST.text = Generate Deprecated List GENERATE_DEPRECATEDLIST.group = Build GENERATE_DEPRECATEDLIST.type = boolean GENERATE_DEPRECATEDLIST.note = The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation. ENABLED_SECTIONS.text = Enabled Sections ENABLED_SECTIONS.group = Build ENABLED_SECTIONS.type = text list ENABLED_SECTIONS.note = The ENABLED_SECTIONS tag can be used to enable conditional documentation sections, marked by @if sectionname ... @endif. MAX_INITIALIZER_LINES.text = Maximum Initializer Lines MAX_INITIALIZER_LINES.group = Build MAX_INITIALIZER_LINES.note =

The MAX_INITIALIZER_LINES tag determines the maximum number of lines the initial value of a variable or define consists of for it to appear in the documentation. If the initializer consists of more lines than specified here it will be hidden. Use a value of 0 to hide initializers completely.

The appearance of the initializer of individual variables and defines in the documentation can be controlled using @showinitializer or @hideinitializer command in the documentation regardless of this setting.

SHOW_USED_FILES.text = Show Used Files SHOW_USED_FILES.group = Build SHOW_USED_FILES.type = boolean SHOW_USED_FILES.note = Set the SHOW_USED_FILES tag to NO to disable the list of files generated at the bottom of the documentation of classes and structs. If set to YES the list will mention the files that were used to generate the documentation. SHOW_DIRECTORIES.text = Show Directories SHOW_DIRECTORIES.group = Build SHOW_DIRECTORIES.type = boolean SHOW_DIRECTORIES.note = If the sources in your project are distributed over multiple directories then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy in the documentation. FILE_VERSION_FILTER.text = File Version Filter FILE_VERSION_FILTER.group = Build FILE_VERSION_FILTER.type = file FILE_VERSION_FILTER.note =

The FILE_VERSION_FILTER tag can be used to specify a program or script that doxygen should invoke to get the current version for each file (typically from the version control system).

Doxygen will invoke the program by executing (via popen()) the command <command> <input-file>, where <command> is the value of the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file provided by doxygen. Whatever the program writes to standard output is used as the file version. See the manual for examples.

#--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET.text = Quiet QUIET.group = Messages QUIET.type = boolean QUIET.note = The QUIET tag can be used to turn on/off the messages that are generated by doxygen. Possible values are YES and NO. If left blank NO is used. WARNINGS.text = Warnings WARNINGS.group = Messages WARNINGS.type = boolean WARNINGS.note = The WARNINGS tag can be used to turn on/off the warning messages that are generated by doxygen. Possible values are YES and NO. If left blank NO is used. WARN_IF_UNDOCUMENTED.text = Warn if Undocumented WARN_IF_UNDOCUMENTED.group = Messages WARN_IF_UNDOCUMENTED.type = boolean WARN_IF_UNDOCUMENTED.note = If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag will automatically be disabled. WARN_IF_DOC_ERROR.text = Warn if Documentation Error WARN_IF_DOC_ERROR.group = Messages WARN_IF_DOC_ERROR.type = boolean WARN_IF_DOC_ERROR.note = If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for potential errors in the documentation, such as not documenting some parameters in a documented function, or documenting parameters that don't exist or using markup commands wrongly. WARN_NO_PARAMDOC.text = Warn for undocumented function parameters WARN_NO_PARAMDOC.group = Messages WARN_NO_PARAMDOC.type = boolean WARN_NO_PARAMDOC.note = This WARN_NO_PARAMDOC option can be abled to get warnings for functions that are documented, but have no documentation for their parameters or return value. If set to NO (the default) doxygen will only warn about wrong or incomplete parameter documentation, but not about the absence of documentation. WARN_FORMAT.text = Warn Format WARN_FORMAT.group = Messages WARN_FORMAT.type = text WARN_FORMAT.note = The WARN_FORMAT tag determines the format of the warning messages that doxygen can produce. The string should contain the $file, $line, and $text tags, which will be replaced by the file and line number from which the warning originated and the warning text. WARN_LOGFILE.text = Warn Logfile WARN_LOGFILE.group = Messages WARN_LOGFILE.type = file WARN_LOGFILE.note = The WARN_LOGFILE tag can be used to specify a file to which warning and error messages should be written. If left blank the output is written to stderr. #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- INPUT.text = Input INPUT.group = Inputs INPUT.type = path list INPUT.note = The INPUT tag can be used to specify the files and/or directories that contain documented source files. You may enter file names like "myfile.cpp" or directories like "/usr/src/myproject". Separate the files or directories with spaces. INPUT_ENCODING.text = Input Encoding INPUT_ENCODING.group = Inputs INPUT_ENCODING.type = text INPUT_ENCODING.note =

This tag can be used to specify the character encoding of the source files that doxygen parses.

Internally doxygen uses the UTF-8 encoding, which is also the default input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of possible encodings.

FILE_PATTERNS.text = File Patterns FILE_PATTERNS.group = Inputs FILE_PATTERNS.type = text list FILE_PATTERNS.note =

If the value of the INPUT tag contains directories, you can use the FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and *.h) to filter out the source-files in the directories.

If left blank the following patterns are tested: *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm

RECURSIVE.text = Recursive RECURSIVE.group = Inputs RECURSIVE.type = boolean RECURSIVE.note = The RECURSIVE tag can be used to turn specify whether or not subdirectories should be searched for input files as well. Possible values are YES and NO. If left blank NO is used. EXCLUDE.text = Exclude EXCLUDE.group = Inputs EXCLUDE.type = path list EXCLUDE.note = The EXCLUDE tag can be used to specify files and/or directories that should excluded from the INPUT source files. This way you can easily exclude a subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE_SYMLINKS.text = Exclude Symlinks EXCLUDE_SYMLINKS.group = Inputs EXCLUDE_SYMLINKS.type = boolean EXCLUDE_SYMLINKS.note = The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories that are symbolic links (a Unix filesystem feature) are excluded from the input. EXCLUDE_SYMBOLS.text = Exclude Symbols EXCLUDE_SYMBOLS.group = Inputs EXCLUDE_SYMBOLS.type = text list EXCLUDE_SYMBOLS.note =

The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names (namespaces, classes, functions, etc.) that should be excluded from the output.

The symbol name can be a fully qualified name, a word, or if the wildcard * is used, a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test

EXCLUDE_PATTERNS.text = Exclude Patterns EXCLUDE_PATTERNS.group = Inputs EXCLUDE_PATTERNS.type = text list EXCLUDE_PATTERNS.note = If the value of the INPUT tag contains directories, you can use the EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude certain files from those directories. EXAMPLE_PATH.text = Example Path EXAMPLE_PATH.group = Inputs EXAMPLE_PATH.type = path list EXAMPLE_PATH.note = The EXAMPLE_PATH tag can be used to specify one or more files or directories that contain example code fragments that are included (see the \include command). EXAMPLE_PATTERNS.text = Example Patterns EXAMPLE_PATTERNS.group = Inputs EXAMPLE_PATTERNS.type = text list EXAMPLE_PATTERNS.note = If the value of the EXAMPLE_PATH tag contains directories, you can use the EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and *.h) to filter out the source-files in the directories. If left blank all files are included. EXAMPLE_RECURSIVE.text = Example Recursive EXAMPLE_RECURSIVE.group = Inputs EXAMPLE_RECURSIVE.type = boolean EXAMPLE_RECURSIVE.note = If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be searched for input files to be used with the \include or \dontinclude commands irrespective of the value of the RECURSIVE tag. Possible values are YES and NO. If left blank NO is used. IMAGE_PATH.text = Image Path IMAGE_PATH.group = Inputs IMAGE_PATH.type = path list IMAGE_PATH.note = The IMAGE_PATH tag can be used to specify one or more files or directories that contain image that are included in the documentation (see the \image command). INPUT_FILTER.text = Input Filter INPUT_FILTER.group = Inputs INPUT_FILTER.type = file INPUT_FILTER.note =

The INPUT_FILTER tag can be used to specify a program that doxygen should invoke to filter for each input file.

Doxygen will invoke the filter program by executing (via popen()) the command <filter> <input-file>, where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the name of an input file. Doxygen will then use the output that the filter program writes to standard output.

If FILTER_PATTERNS is specified, this tag will be ignored.

FILTER_PATTERNS.text = Filter Patterns FILTER_PATTERNS.group = Inputs FILTER_PATTERNS.type = text list FILTER_PATTERNS.note =

The FILTER_PATTERNS tag can be used to specify filters on a per file pattern basis. Doxygen will compare the file name with each pattern and apply the filter if there is a match.

The filters are a list of the form: pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further info on how filters are used.

If FILTER_PATTERNS is empty, INPUT_FILTER is applied to all files.

FILTER_SOURCE_FILES.text = Filter Source Files FILTER_SOURCE_FILES.group = Inputs FILTER_SOURCE_FILES.type = boolean FILTER_SOURCE_FILES.note = If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using INPUT_FILTER) will be used to filter the input files when producing source files to browse (i.e. when SOURCE_BROWSER is set to YES). #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER.text = Source Browser SOURCE_BROWSER.group = Source Browsing SOURCE_BROWSER.type = boolean SOURCE_BROWSER.note =

If the SOURCE_BROWSER tag is set to YES then a list of source files will be generated. Documented entities will be cross-referenced with these sources.

Note: To get rid of all source code in the generated output, make sure also VERBATIM_HEADERS is set to NO.

INLINE_SOURCES.text = Inline Sources INLINE_SOURCES.group = Source Browsing INLINE_SOURCES.type = boolean INLINE_SOURCES.note = Setting the INLINE_SOURCES tag to YES will include the body of functions and classes directly in the documentation. STRIP_CODE_COMMENTS.text = Strip Code Comments STRIP_CODE_COMMENTS.group = Source Browsing STRIP_CODE_COMMENTS.type = boolean STRIP_CODE_COMMENTS.note = Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct doxygen to hide any special comment blocks from generated source code fragments. Normal C and C++ comments will always remain visible. REFERENCED_BY_RELATION.text = Referenced by Relation REFERENCED_BY_RELATION.group = Source Browsing REFERENCED_BY_RELATION.type = boolean REFERENCED_BY_RELATION.note = If the REFERENCED_BY_RELATION tag is set to YES (the default) then for each documented function all documented functions referencing it will be listed. REFERENCES_RELATION.text = References Relation REFERENCES_RELATION.group = Source Browsing REFERENCES_RELATION.type = boolean REFERENCES_RELATION.note = If the REFERENCES_RELATION tag is set to YES (the default) then for each documented function all documented entities called/used by that function will be listed. REFERENCES_LINK_SOURCE.text = Reference Link Source REFERENCES_LINK_SOURCE.group = Source Browsing REFERENCES_LINK_SOURCE.type = boolean REFERENCES_LINK_SOURCE.note = If the REFERENCES_LINK_SOURCE tag is set to YES (the default) and SOURCE_BROWSER tag is set to YES, then the hyperlinks from functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will link to the documentstion. USE_HTAGS.text = Use htags USE_HTAGS.group = Source Browsing USE_HTAGS.type = boolean USE_HTAGS.note =

If the USE_HTAGS tag is set to YES then the references to source code will point to the HTML generated by the htags(1) tool instead of doxygen built-in source browser.

The htags tool is part of GNU's global source tagging system (see http://www.gnu.org/software/global/global.html). You will need version 4.8.6 or higher.

VERBATIM_HEADERS.text = Verbatim Headers VERBATIM_HEADERS.group = Source Browsing VERBATIM_HEADERS.type = boolean VERBATIM_HEADERS.note = If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen will generate a verbatim copy of the header file for each class for which an include is specified. Set to NO to disable this. #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- ALPHABETICAL_INDEX.text = Alphabetical Index ALPHABETICAL_INDEX.group = Alphabetical Class Index ALPHABETICAL_INDEX.type = boolean ALPHABETICAL_INDEX.note = If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all compounds will be generated. Enable this if the project contains a lot of classes, structs, unions or interfaces. COLS_IN_ALPHA_INDEX.text = Columns in Alphabetical Index COLS_IN_ALPHA_INDEX.group = Alphabetical Class Index COLS_IN_ALPHA_INDEX.note = If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in which this list will be split (can be a number in the range [1..20]) IGNORE_PREFIX.text = Ignore Prefix IGNORE_PREFIX.group = Alphabetical Class Index IGNORE_PREFIX.type = text list IGNORE_PREFIX.note = In case all classes in a project start with a common prefix, all classes will be put under the same header in the alphabetical index. The IGNORE_PREFIX tag can be used to specify one or more prefixes that should be ignored while generating the index headers. #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML.text = Generate HTML GENERATE_HTML.group = HTML Output GENERATE_HTML.type = boolean GENERATE_HTML.note = If the GENERATE_HTML tag is set to YES (the default) Doxygen will generate HTML output. HTML_OUTPUT.text = HTML Output HTML_OUTPUT.group = HTML Output HTML_OUTPUT.type = directory HTML_OUTPUT.note = The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put in front of it. If left blank `html' will be used as the default path. HTML_FILE_EXTENSION.text = HTML File Extension HTML_FILE_EXTENSION.group = HTML Output HTML_FILE_EXTENSION.note = The HTML_FILE_EXTENSION tag can be used to specify the file extension for each generated HTML page (for example: .htm,.php,.asp). If it is left blank doxygen will generate files with .html extension. HTML_HEADER.text = HTML Header HTML_HEADER.group = HTML Output HTML_HEADER.type = file HTML_HEADER.note = The HTML_HEADER tag can be used to specify a personal HTML header for each generated HTML page. If it is left blank doxygen will generate a standard header. HTML_FOOTER.text = HTML Footer HTML_FOOTER.group = HTML Output HTML_FOOTER.type = file HTML_FOOTER.note = The HTML_FOOTER tag can be used to specify a personal HTML footer for each generated HTML page. If it is left blank doxygen will generate a standard footer. HTML_STYLESHEET.text = HTML Stylesheet HTML_STYLESHEET.group = HTML Output HTML_STYLESHEET.type = file HTML_STYLESHEET.note =

The HTML_STYLESHEET tag can be used to specify a user-defined cascading style sheet that is used by each HTML page. It can be used to fine-tune the look of the HTML output. If the tag is left blank doxygen will generate a default style sheet.

Note that doxygen will try to copy the style sheet file to the HTML output directory, so don't put your own stylesheet in the HTML output directory as well, or it will be erased!

HTML_ALIGN_MEMBERS.text = HTML Align Members HTML_ALIGN_MEMBERS.group = HTML Output HTML_ALIGN_MEMBERS.type = boolean HTML_ALIGN_MEMBERS.note = If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, files or namespaces will be aligned in HTML using tables. If set to NO a bullet list will be used. GENERATE_HTMLHELP.text = Generate HTML Help GENERATE_HTMLHELP.group = HTML Output GENERATE_HTMLHELP.type = boolean GENERATE_HTMLHELP.note = If the GENERATE_HTMLHELP tag is set to YES, additional index files will be generated that can be used as input for tools like the Microsoft HTML help workshop to generate a compressed HTML help file (.chm) of the generated HTML documentation. HTML_DYNAMIC_SECTIONS.text = HTML Dynamic Sections HTML_DYNAMIC_SECTIONS.group = HTML Output HTML_DYNAMIC_SECTIONS.type = boolean HTML_DYNAMIC_SECTIONS.note =

If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML documentation will contain sections that can be hidden and shown after the page has loaded.

For this to work a browser that supports JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox, Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).

CHM_FILE.text = CHM File CHM_FILE.group = HTML Output CHM_FILE.type = file CHM_FILE.note = If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can be used to specify the file name of the resulting .chm file. You can add a path in front of the file if the result should not be written to the html output directory. HHC_LOCATION.text = HHC Location HHC_LOCATION.group = HTML Output HHC_LOCATION.type = file HHC_LOCATION.note = If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can be used to specify the location (absolute path including file name) of the HTML help compiler (hhc.exe). If non-empty doxygen will try to run the HTML help compiler on the generated index.hhp. GENERATE_CHI.text = Generate CHI GENERATE_CHI.group = HTML Output GENERATE_CHI.type = boolean GENERATE_CHI.note = If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag controls if a separate .chi index file is generated (YES) or that it should be included in the master .chm file (NO). BINARY_TOC.text = Binary TOC BINARY_TOC.group = HTML Output BINARY_TOC.type = boolean BINARY_TOC.note = If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag controls whether a binary table of contents is generated (YES) or a normal table of contents (NO) in the .chm file. TOC_EXPAND.text = TOC Expand TOC_EXPAND.group = HTML Output TOC_EXPAND.type = boolean TOC_EXPAND.note = The TOC_EXPAND flag can be set to YES to add extra items for group members to the contents of the HTML help documentation and to the tree view. DISABLE_INDEX.text = Disable Index DISABLE_INDEX.group = HTML Output DISABLE_INDEX.type = boolean DISABLE_INDEX.note = The DISABLE_INDEX tag can be used to turn on/off the condensed index at top of each HTML page. The value NO (the default) enables the index and the value YES disables it. ENUM_VALUES_PER_LINE.text = Enum Values per Line ENUM_VALUES_PER_LINE.group = HTML Output ENUM_VALUES_PER_LINE.note = This tag can be used to set the number of enum values (range [1..20]) that doxygen will group on one line in the generated HTML documentation. GENERATE_TREEVIEW.text = Generate Tree View GENERATE_TREEVIEW.group = HTML Output GENERATE_TREEVIEW.type = boolean GENERATE_TREEVIEW.note =

If the GENERATE_TREEVIEW tag is set to YES, a side panel will begenerated containing a tree-like index structure (just like the one that is generated for HTML Help).

For this to work a browser that supports JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are probably better off using the HTML help feature.

TREEVIEW_WIDTH.text = Tree View Width TREEVIEW_WIDTH.group = HTML Output TREEVIEW_WIDTH.note = If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used to set the initial width (in pixels) of the frame in which the tree is shown. #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX.text = Generate LaTeX GENERATE_LATEX.group = LaTeX output GENERATE_LATEX.type = boolean GENERATE_LATEX.note = If the GENERATE_LATEX tag is set to YES (the default) Doxygen will generate Latex output. LATEX_OUTPUT.text = LaTeX Output LATEX_OUTPUT.group = LaTeX output LATEX_OUTPUT.type = directory LATEX_OUTPUT.note = The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put in front of it. If left blank `latex' will be used as the default path. LATEX_CMD_NAME.text = LaTeX Command Name LATEX_CMD_NAME.group = LaTeX output LATEX_CMD_NAME.note = The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name. MAKEINDEX_CMD_NAME.text = makeindex Command Name MAKEINDEX_CMD_NAME.group = LaTeX output MAKEINDEX_CMD_NAME.note = The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate index for LaTeX. If left blank `makeindex' will be used as the default command name. COMPACT_LATEX.text = Compact LaTeX COMPACT_LATEX.group = LaTeX output COMPACT_LATEX.type = boolean COMPACT_LATEX.note = If the COMPACT_LATEX tag is set to YES Doxygen generates more compact LaTeX documents. This may be useful for small projects and may help to save some trees in general. PAPER_TYPE.text = Paper Type PAPER_TYPE.group = LaTeX output PAPER_TYPE.note = The PAPER_TYPE tag can be used to set the paper type that is used by the printer. Possible values are: a4, a4wide, letter, legal and executive. If left blank a4wide will be used. EXTRA_PACKAGES.text = Extra Packages EXTRA_PACKAGES.group = LaTeX output EXTRA_PACKAGES.note = The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX packages that should be included in the LaTeX output. LATEX_HEADER.text = LaTeX Header LATEX_HEADER.group = LaTeX output LATEX_HEADER.type = file LATEX_HEADER.note = The LATEX_HEADER tag can be used to specify a personal LaTeX header for the generated latex document. The header should contain everything until the first chapter. If it is left blank doxygen will generate a standard header. Notice: only use this tag if you know what you are doing! PDF_HYPERLINKS.text = PDF Hyperlinks PDF_HYPERLINKS.group = LaTeX output PDF_HYPERLINKS.type = boolean PDF_HYPERLINKS.note = If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is prepared for conversion to pdf (using ps2pdf). The pdf file will contain links (just like the HTML output) instead of page references This makes the output suitable for online browsing using a pdf viewer. USE_PDFLATEX.text = Use pdflatex USE_PDFLATEX.group = LaTeX output USE_PDFLATEX.type = boolean USE_PDFLATEX.note = If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of plain latex in the generated Makefile. Set this option to YES to get a higher quality PDF documentation. LATEX_BATCHMODE.text = LaTeX Batch Mode LATEX_BATCHMODE.group = LaTeX output LATEX_BATCHMODE.type = boolean LATEX_BATCHMODE.note = If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. command to the generated LaTeX files. This will instruct LaTeX to keep running if errors occur, instead of asking the user for help. This option is also used when generating formulas in HTML. LATEX_HIDE_INDICES.text = LaTeX Hide Indices LATEX_HIDE_INDICES.group = LaTeX output LATEX_HIDE_INDICES.type = boolean LATEX_HIDE_INDICES.note = If LATEX_HIDE_INDICES is set to YES then doxygen will not include the index chapters (such as File Index, Compound Index, etc.) in the output. #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF.text = Generate RTF GENERATE_RTF.group = RTF Output GENERATE_RTF.type = boolean GENERATE_RTF.note = If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output The RTF output is optimized for Word 97 and may not look very pretty with other RTF readers or editors. RTF_OUTPUT.text = RTF Output RTF_OUTPUT.group = RTF Output RTF_OUTPUT.type = directory RTF_OUTPUT.note = The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put in front of it. If left blank `rtf' will be used as the default path. COMPACT_RTF.text = Compact RTF COMPACT_RTF.group = RTF Output COMPACT_RTF.type = boolean COMPACT_RTF.note = If the COMPACT_RTF tag is set to YES Doxygen generates more compact RTF documents. This may be useful for small projects and may help to save some trees in general. RTF_HYPERLINKS.text = RTF Hyperlinks RTF_HYPERLINKS.group = RTF Output RTF_HYPERLINKS.type = boolean RTF_HYPERLINKS.note =

If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will contain hyperlink fields. The RTF file will contain links (just like the HTML output) instead of page references. This makes the output suitable for online browsing using WORD or other programs which support those fields.

Note: wordpad (write) and others do not support links.

RTF_STYLESHEET_FILE.text = RTF Stylesheet File RTF_STYLESHEET_FILE.group = RTF Output RTF_STYLESHEET_FILE.note = Load stylesheet definitions from file. Syntax is similar to doxygen's config file, i.e. a series of assignments. You only have to provide replacements, missing definitions are set to their default value. RTF_EXTENSIONS_FILE.text = RTF Extensions File RTF_EXTENSIONS_FILE.group = RTF Output RTF_EXTENSIONS_FILE.note = Set optional variables used in the generation of an rtf document. Syntax is similar to doxygen's config file. #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN.text = Generate man GENERATE_MAN.group = man Output GENERATE_MAN.type = boolean GENERATE_MAN.note = If the GENERATE_MAN tag is set to YES (the default) Doxygen will generate man pages. MAN_OUTPUT.text = man Output MAN_OUTPUT.group = man Output MAN_OUTPUT.type = directory MAN_OUTPUT.note = The MAN_OUTPUT tag is used to specify where the man pages will be put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put in front of it. If left blank `man' will be used as the default path. MAN_EXTENSION.text = man Extension MAN_EXTENSION.group = man Output MAN_EXTENSION.note = The MAN_EXTENSION tag determines the extension that is added to the generated man pages (default is the subroutine's section .3) MAN_LINKS.text = man Links MAN_LINKS.group = man Output MAN_LINKS.type = boolean MAN_LINKS.note = If the MAN_LINKS tag is set to YES and Doxygen generates man output, then it will generate one additional man file for each entity documented in the real man page(s). These additional files only source the real man page, but without them the man command would be unable to find the correct page. The default is NO. #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML.text = Generate XML GENERATE_XML.group = XML Output GENERATE_XML.type = boolean GENERATE_XML.note = If the GENERATE_XML tag is set to YES Doxygen will generate an XML file that captures the structure of the code including all documentation. XML_OUTPUT.text = XML Output XML_OUTPUT.group = XML Output XML_OUTPUT.type = directory XML_OUTPUT.note = The XML_OUTPUT tag is used to specify where the XML pages will be put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put in front of it. If left blank `xml' will be used as the default path. XML_SCHEMA.text = XML Schema XML_SCHEMA.group = XML Output XML_SCHEMA.type = file XML_SCHEMA.note = The XML_SCHEMA tag can be used to specify an XML schema, which can be used by a validating XML parser to check the syntax of the XML files. XML_DTD.text = XML DTD XML_DTD.group = XML Output XML_DTD.type = file XML_DTD.note = The XML_DTD tag can be used to specify an XML DTD, which can be used by a validating XML parser to check the syntax of the XML files. XML_PROGRAMLISTING.text = XML Program Listing XML_PROGRAMLISTING.group = XML Output XML_PROGRAMLISTING.type = boolean XML_PROGRAMLISTING.note = If the XML_PROGRAMLISTING tag is set to YES Doxygen will dump the program listings (including syntax highlighting and cross-referencing information) to the XML output. Note that enabling this will significantly increase the size of the XML output. #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF.text = Generate Autogen Definition GENERATE_AUTOGEN_DEF.type = boolean GENERATE_AUTOGEN_DEF.note = If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will generate an AutoGen Definitions (see autogen.sf.net) file that captures the structure of the code including all documentation. Note that this feature is still experimental and incomplete at the moment. #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD.text = Generate Perl Module GENERATE_PERLMOD.group = Perl Module Output GENERATE_PERLMOD.type = boolean GENERATE_PERLMOD.note = If the GENERATE_PERLMOD tag is set to YES Doxygen will generate a Perl module file that captures the structure of the code including all documentation. Note that this feature is still experimental and incomplete at the moment. PERLMOD_LATEX.text = Perl Module LaTeX PERLMOD_LATEX.group = Perl Module Output PERLMOD_LATEX.type = boolean PERLMOD_LATEX.note = If the PERLMOD_LATEX tag is set to YES Doxygen will generate the necessary Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI output from the Perl module output. PERLMOD_PRETTY.text = Perl Module Pretty PERLMOD_PRETTY.group = Perl Module Output PERLMOD_PRETTY.type = boolean PERLMOD_PRETTY.note = If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely formatted so it can be parsed by a human reader. This is useful if you want to understand what is going on. On the other hand, if this tag is set to NO the size of the Perl module output will be much smaller and Perl will parse it just the same. PERLMOD_MAKEVAR_PREFIX.text = Perl Module MakeVar Prefix PERLMOD_MAKEVAR_PREFIX.group = Perl Module Output PERLMOD_MAKEVAR_PREFIX.note = The names of the make variables in the generated doxyrules.make file are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful so different doxyrules.make files included by the same Makefile don't overwrite each other's variables. #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING.text = Enable Preprocessing ENABLE_PREPROCESSING.group = Preprocessing ENABLE_PREPROCESSING.type = boolean ENABLE_PREPROCESSING.note = If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will evaluate all C-preprocessor directives found in the sources and include files. MACRO_EXPANSION.text = Macro Expansion MACRO_EXPANSION.group = Preprocessing MACRO_EXPANSION.type = boolean MACRO_EXPANSION.note = If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro names in the source code. If set to NO (the default) only conditional compilation will be performed. Macro expansion can be done in a controlled way by setting EXPAND_ONLY_PREDEF to YES. EXPAND_ONLY_PREDEF.text = Expand Only Predefined EXPAND_ONLY_PREDEF.group = Preprocessing EXPAND_ONLY_PREDEF.type = boolean EXPAND_ONLY_PREDEF.note = If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then the macro expansion is limited to the macros specified with the PREDEFINED and EXPAND_AS_DEFINED tags. SEARCH_INCLUDES.text = Search Includes SEARCH_INCLUDES.group = Preprocessing SEARCH_INCLUDES.type = boolean SEARCH_INCLUDES.note = If the SEARCH_INCLUDES tag is set to YES (the default) the includes files in the INCLUDE_PATH (see below) will be search if a #include is found. INCLUDE_PATH.text = Include Path INCLUDE_PATH.group = Preprocessing INCLUDE_PATH.type = directory list INCLUDE_PATH.note = The INCLUDE_PATH tag can be used to specify one or more directories that contain include files that are not input files but should be processed by the preprocessor. INCLUDE_FILE_PATTERNS.text = Include File Patterns INCLUDE_FILE_PATTERNS.group = Preprocessing INCLUDE_FILE_PATTERNS.type = text list INCLUDE_FILE_PATTERNS.note = You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard patterns (like *.h and *.hpp) to filter out the header-files in the directories. If left blank, the patterns specified with FILE_PATTERNS will be used. PREDEFINED.text = Predefined PREDEFINED.group = Preprocessing PREDEFINED.type = text list PREDEFINED.note =

The PREDEFINED tag can be used to specify one or more macro names that are defined before the preprocessor is started (similar to the -D option of gcc).

The argument of the tag is a list of macros of the form: name or name=definition (no spaces). If the definition and the = are omitted =1 is assumed. To prevent a macro definition from being undefined via #undef or recursively expanded use the := operator instead of the = operator.

EXPAND_AS_DEFINED.text = Expand as Defined EXPAND_AS_DEFINED.group = Preprocessing EXPAND_AS_DEFINED.type = text list EXPAND_AS_DEFINED.note = If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this tag can be used to specify a list of macro names that should be expanded. The macro definition that is found in the sources will be used. Use the PREDEFINED tag if you want to use a different macro definition. SKIP_FUNCTION_MACROS.text = Skip Function Macros SKIP_FUNCTION_MACROS.group = Preprocessing SKIP_FUNCTION_MACROS.type = boolean SKIP_FUNCTION_MACROS.note = If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then doxygen's preprocessor will remove all function-like macros that are alone on a line, have an all uppercase name, and do not end with a semicolon. Such function macros are typically used for boiler-plate code, and will confuse the parser if not removed. #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- TAGFILES.text = Tag Files TAGFILES.group = External References TAGFILES.type = text list TAGFILES.note =

The TAGFILES option can be used to specify one or more tagfiles.

Optionally an initial location of the external documentation can be added for each tagfile. The format of a tag file without this location is as follows:
TAGFILES = file1 file2 ...

Adding location for the tag files is done as follows:
TAGFILES = file1=loc1 "file2 = loc2" ...
where "loc1" and "loc2" can be relative or absolute paths or URLs. If a location is present for each tag, the installdox tool does not have to be run to correct the links.

Note that each tag file must have a unique name (where the name does NOT include the path). If a tag file is not located in the directory in which doxygen is run, you must also specify the path to the tagfile here.

GENERATE_TAGFILE.text = Generate Tag Files GENERATE_TAGFILE.group = External References GENERATE_TAGFILE.type = file GENERATE_TAGFILE.note = When a file name is specified after GENERATE_TAGFILE, doxygen will create a tag file that is based on the input files it reads. ALLEXTERNALS.text = All Externals ALLEXTERNALS.group = External References ALLEXTERNALS.type = boolean ALLEXTERNALS.note = If the ALLEXTERNALS tag is set to YES all external classes will be listed in the class index. If set to NO only the inherited external classes will be listed. EXTERNAL_GROUPS.text = External Groups EXTERNAL_GROUPS.group = External References EXTERNAL_GROUPS.type = boolean EXTERNAL_GROUPS.note = If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in the modules index. If set to NO, only the current project's groups will be listed. PERL_PATH.text = Perl Path PERL_PATH.group = External References PERL_PATH.type = file PERL_PATH.note = The PERL_PATH should be the absolute path and name of the perl script interpreter (i.e. the result of `which perl'). #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- CLASS_DIAGRAMS.text = Class Diagrams CLASS_DIAGRAMS.group = dot Tool CLASS_DIAGRAMS.type = boolean CLASS_DIAGRAMS.note =

If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or super classes. Setting the tag to NO turns the diagrams off.

Note that this option is superseded by the HAVE_DOT option below. This is only a fallback. It is recommended to install and use dot, since it yields more powerful graphs.

MSCGEN_PATH.text = mscgen Path MSCGEN_PATH.group = dot Tool MSCGEN_PATH.type = directory MSCGEN_PATH.note =

You can define message sequence charts within doxygen comments using the @msc command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the documentation.

The MSCGEN_PATH tag allows you to specify the directory where the mscgen tool resides. If left empty the tool is assumed to be found in the default search path.

HIDE_UNDOC_RELATIONS.text = Hide Undocumented Relations HIDE_UNDOC_RELATIONS.group = dot Tool HIDE_UNDOC_RELATIONS.type = boolean HIDE_UNDOC_RELATIONS.note = If set to YES, the inheritance and collaboration graphs will hide inheritance and usage relations if the target is undocumented or is not a class. HAVE_DOT.text = Have DOT HAVE_DOT.group = dot Tool HAVE_DOT.type = boolean HAVE_DOT.note = If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is available from the path. This tool is part of Graphviz, a graph visualization toolkit from AT&T and Lucent Bell Labs. The other options in this section have no effect if this option is set to NO (the default) CLASS_GRAPH.text = Class Graph CLASS_GRAPH.group = dot Tool CLASS_GRAPH.type = boolean CLASS_GRAPH.note = If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen will generate a graph for each documented class showing the direct and indirect inheritance relations. Setting this tag to YES will force the the CLASS_DIAGRAMS tag to NO. COLLABORATION_GRAPH.text = Collaboration Graph COLLABORATION_GRAPH.group = dot Tool COLLABORATION_GRAPH.type = boolean COLLABORATION_GRAPH.note = If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen will generate a graph for each documented class showing the direct and indirect implementation dependencies (inheritance, containment, and class references variables) of the class with other documented classes. GROUP_GRAPHS.text = Groups Graphs GROUP_GRAPHS.group = dot Tool GROUP_GRAPHS.type = boolean GROUP_GRAPHS.note = If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen will generate a graph for groups, showing the direct groups dependencies. UML_LOOK.text = UML Look UML_LOOK.group = dot Tool UML_LOOK.type = boolean UML_LOOK.note = If the UML_LOOK tag is set to YES doxygen will generate inheritance and collaboration diagrams in a style similar to the OMG's Unified Modeling Language. TEMPLATE_RELATIONS.text = Template Relations TEMPLATE_RELATIONS.group = dot Tool TEMPLATE_RELATIONS.type = boolean TEMPLATE_RELATIONS.note = If set to YES, the inheritance and collaboration graphs will show the relations between templates and their instances. INCLUDE_GRAPH.text = Include Graph INCLUDE_GRAPH.group = dot Tool INCLUDE_GRAPH.type = boolean INCLUDE_GRAPH.note = If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT tags are set to YES then doxygen will generate a graph for each documented file showing the direct and indirect include dependencies of the file with other documented files. INCLUDED_BY_GRAPH.text = Included-by Graph INCLUDED_BY_GRAPH.group = dot Tool INCLUDED_BY_GRAPH.type = boolean INCLUDED_BY_GRAPH.note = If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to YES then doxygen will generate a graph for each documented header file showing the documented files that directly or indirectly include this file. CALL_GRAPH.text = Call Graph CALL_GRAPH.group = dot Tool CALL_GRAPH.type = boolean CALL_GRAPH.note =

If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will generate a call dependency graph for every global function or class method.

Note that enabling this option will significantly increase the time of a run. So in most cases it will be better to enable call graphs for selected functions only using the @callgraph command.

CALLER_GRAPH.text = Caller Graph CALLER_GRAPH.group = dot Tool CALLER_GRAPH.type = boolean CALLER_GRAPH.note =

If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will generate a caller dependency graph for every global function or class method.

Note that enabling this option will significantly increase the time of a run. So in most cases it will be better to enable caller graphs for selected functions only using the @callergraph command.

GRAPHICAL_HIERARCHY.text = Graphical Hierarchy GRAPHICAL_HIERARCHY.group = dot Tool GRAPHICAL_HIERARCHY.type = boolean GRAPHICAL_HIERARCHY.note = If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen will graphical hierarchy of all classes instead of a textual one. DIRECTORY_GRAPH.text = Directory Graph DIRECTORY_GRAPH.group = dot Tool DIRECTORY_GRAPH.type = boolean DIRECTORY_GRAPH.note = If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES then doxygen will show the dependencies a directory has on other directories in a graphical way. The dependency relations are determined by the #include relations between the files in the directories. DOT_IMAGE_FORMAT.text = DOT Image Format DOT_IMAGE_FORMAT.group = dot Tool DOT_IMAGE_FORMAT.type = text DOT_IMAGE_FORMAT.note = The DOT_IMAGE_FORMAT tag can be used to set the image format of the images generated by dot. Possible values are png, jpg, or gif. If left blank png will be used. DOT_PATH.text = DOT Path DOT_PATH.group = dot Tool DOT_PATH.type = file DOT_PATH.note = The tag DOT_PATH can be used to specify the path where the dot tool can be found. If left blank, it is assumed the dot tool can be found on the path. DOTFILE_DIRS.text = DOT Files Directories DOTFILE_DIRS.group = dot Tool DOTFILE_DIRS.type = directory list DOTFILE_DIRS.note = The DOTFILE_DIRS tag can be used to specify one or more directories that contain dot files that are included in the documentation (see the \dotfile command). MAX_DOT_GRAPH_WIDTH.text = Maximum DOT Graph Width MAX_DOT_GRAPH_WIDTH.group = dot Tool MAX_DOT_GRAPH_WIDTH.note =

The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width (in pixels) of the graphs generated by dot.

If a graph becomes larger than this value, doxygen will try to truncate the graph, so that it fits within the specified constraint. Beware that most browsers cannot cope with very large images.

MAX_DOT_GRAPH_HEIGHT.text = Maximum DOT Graph Height MAX_DOT_GRAPH_HEIGHT.group = dot Tool MAX_DOT_GRAPH_HEIGHT.note =

The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height (in pixels) of the graphs generated by dot.

If a graph becomes larger than this value, doxygen will try to truncate the graph, so that it fits within the specified constraint. Beware that most browsers cannot cope with very large images.

MAX_DOT_GRAPH_DEPTH.text = Maximum DOT Graph Depth MAX_DOT_GRAPH_DEPTH.group = dot Tool MAX_DOT_GRAPH_DEPTH.note =

The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs generated by dot. A depth value of 3 means that only nodes reachable from the root by following a path via at most 3 edges will be shown. Nodes that lay further from the root node will be omitted.

Note that setting this option to 1 or 2 may greatly reduce the computation time needed for large code bases.

Also note that a graph may be further truncated if the graph's image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), the graph is not depth-constrained.

DOT_GRAPH_MAX_NODES.text = DOT Graph Max Nodes DOT_GRAPH_MAX_NODES.group = dot Tool DOT_GRAPH_MAX_NODES.type = text DOT_GRAPH_MAX_NODES.note =

The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes that will be shown in the graph.

If the number of nodes in a graph becomes larger than this value, doxygen will truncate the graph, which is visualized by representing a node as a red box. Note that doxygen will always show the root nodes and its direct children regardless of this setting.

DOT_TRANSPARENT.text = DOT Transparent DOT_TRANSPARENT.group = dot Tool DOT_TRANSPARENT.type = boolean DOT_TRANSPARENT.note =

Set the DOT_TRANSPARENT tag to YES to generate images with a transparent background. This is disabled by default, which results in a white background.

Warning: Depending on the platform used, enabling this option may lead to badly anti-aliased labels on the edges of a graph (i.e. they become hard to read).

DOT_MULTI_TARGETS.text = DOT Multi Targets DOT_MULTI_TARGETS.group = dot Tool DOT_MULTI_TARGETS.type = boolean DOT_MULTI_TARGETS.note =

Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output files in one run (i.e. multiple -o and -T options on the command line).

This makes dot run faster, but since only newer versions of dot (>1.8.10) support this, this feature is disabled by default.

GENERATE_LEGEND.text = Generate Legend GENERATE_LEGEND.group = dot Tool GENERATE_LEGEND.type = boolean GENERATE_LEGEND.note = If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will generate a legend page explaining the meaning of the various boxes and arrows in the dot generated graphs. DOT_CLEANUP.text = DOT Clean-up DOT_CLEANUP.group = dot Tool DOT_CLEANUP.type = boolean DOT_CLEANUP.note = If the DOT_CLEANUP tag is set to YES (the default) Doxygen will remove the intermediate dot files that are used to generate the various graphs. #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- SEARCHENGINE.text = Search Engine SEARCHENGINE.type = boolean SEARCHENGINE.note = The SEARCHENGINE tag specifies whether or not a search engine should be used. If set to NO the values of all tags below this one will be ignored. eclox/eclox.core/build.properties0000644000076400007640000000031310406274773016547 0ustar willywillysource.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.xml,\ misc/ src.includes = misc/,\ META-INF/,\ plugin.xml eclox/eclox.core/.cvsignore0000644000076400007640000000000410406275164015322 0ustar willywillybin eclox/eclox.core/.project0000644000076400007640000000120310405231037014761 0ustar willywilly eclox.core org.eclipse.jdt.core.javabuilder org.eclipse.pde.ManifestBuilder org.eclipse.pde.SchemaBuilder org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature eclox/eclox.core/.classpath0000644000076400007640000000045410405231037015304 0ustar willywilly eclox/eclox.feature/0000755000076400007640000000000012166321431014025 5ustar willywillyeclox/eclox.feature/README0000644000076400007640000000021110347236674014714 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/README * eclox/eclox.feature/feature.xml0000644000076400007640000000370412166321337016213 0ustar willywilly Eclox provides the Doxygen documentation system for Eclipse. This feature provides a documentation builder and a graphical editor for doxygen. Copyright (C) 2003-2013 Guillaume Brocker All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution. eclox/eclox.feature/AUTHORS0000644000076400007640000000021310347236674015106 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/AUTHORS * eclox/eclox.feature/TODO0000644000076400007640000000020510347236674014527 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/TODO * eclox/eclox.feature/CHANGES0000644000076400007640000000021310347236674015031 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/CHANGES * eclox/eclox.feature/MANUAL0000644000076400007640000000021110347236674014734 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/MANUAL * eclox/eclox.feature/COPYING0000644000076400007640000000021310347236674015071 0ustar willywillyPlease go to either location: * [your eclipse base directory]/plugins/org.gna.eclox_x.y.z/COPYING * eclox/eclox.feature/build.properties0000644000076400007640000000062410347576600017255 0ustar willywillybin.includes = feature.xml,\ AUTHORS,\ CHANGES,\ COPYING,\ MANUAL,\ README,\ TODO src.includes = AUTHORS,\ CHANGES,\ COPYING,\ MANUAL,\ README,\ build.properties,\ feature.xml,\ TODO,\ .project eclox/eclox.feature/.project0000644000076400007640000000056010272720630015475 0ustar willywilly eclox.feature org.eclipse.pde.FeatureBuilder org.eclipse.pde.FeatureNature eclox/eclox/0000755000076400007640000000000012166321432012374 5ustar willywillyeclox/eclox/META-INF/0000755000076400007640000000000012166321432013534 5ustar willywillyeclox/eclox/META-INF/MANIFEST.MF0000644000076400007640000000033212166012446015166 0ustar willywillyManifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Eclox Branding Information Bundle-SymbolicName: org.gna.eclox; singleton:=true Bundle-Version: 0.10.0 Bundle-Vendor: Guillaume Brocker Bundle-Localization: eclox/eclox/eclox.png0000644000076400007640000000212610417753162014223 0ustar willywillyPNG  IHDR szzbKGD pHYs  tIME6 h_zIDATX}SnZR4/˲%z3H̎2K 揰X}FlYw1c*WzEFoWw^lw{sáU{Űj4g4y5(X[9vzku^ jgpSE'd Ӕ ^"m(0́-aaV{/Ɖ s0ŰPɣscyQ«/[iH'!;o1bの?L8 ݂!QK12sMPe(Űh p&ޅM؈ƿ'[(K)IENDB`eclox/eclox/about.ini0000644000076400007640000000030310433302621014175 0ustar willywillyaboutText = Eclox, a Doxygen frontend plugin for Eclipse.\nVisit http://home.gna.org/eclox/\n\nThis software is based on doxygen.\nhttp://www.doxygen.org/ featureImage = eclox.png appNale = Ecloxeclox/eclox/README0000644000076400007640000000073212166321337013262 0ustar willywilly Eclox, a Doxygen frontend plugin for Eclipse. Copyright (C) 2003-2013, Guillaume Brocker All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: Guillaume Brocker - Initial API and implementation See MANUAL for usage. eclox/eclox/AUTHORS0000644000076400007640000000005310333170752013443 0ustar willywillyGuillaume Brocker eclox/eclox/TODO0000644000076400007640000000260710432337327013075 0ustar willywillyTODO (later): - Create a "doxyfiles" view, listing all avaliable doxyfiles in all opened projects. - For each plateform, setup default path for doxygen binary. - Detect overriden assignments and display a warning. - Show when a setting value is inherited and when it is not - See what IEditorMatchingStratedgy can do for us. - Creation of property page for doxyfiles. - Creation of an incremental builder that checks for compatibility with the current doxygen version. - Creation of markers to notify problems in doxyfiles found during parsing. - Add a build launch action in the build log toolbar. - Mettre un nom de fichier de configuration par dfaut dans le wizard. - Mieux grer les exceptions plutt que de laisser des "catch" vides. - Mettre une dcoration dans l'outline afin d'afficher les lments qui ont t modifis. - Amliorer l'aspect graphique (icones, images). - Ecouter les modifications sur le fichier en cours d'dition pour dtecter une modification externe (edition, suppression). WISHES: - Copier le texte de la sortie de compilation. - Bouttons dans la barre d'outils du l'diteur pour compiler et browser directement la documentation gnre. - Dans le menu contextuel du fichier doxygen, ajouter des actions pour browser la documentation gnre. - Recherche d'un tag par mot cl se trouvant dans le nom du tag, soit dans son commentaire associ. - Prvoir la localisation des textes.eclox/eclox/CHANGES0000644000076400007640000003550612166016140013375 0ustar willywillyeclox-0.10.0 (7-juil-2013) New release of eclox distributed under EPL 1.0 (to allow debian packaging). eclox-0.8.1 FIX bug #12915 : Misspelling in Doxyfile Editor. eclox-0.8.0 (17-oct-2008) New release of eclox, for eclipse 3.3+ ! Release 0.8.0 integrates all features and fixes done in 0.7.x releases. eclox-0.7.3 (28-mai-2008) ADD task #5974 : Automatic doxyfile creation when clicking the "build" action. When the user wants to build a doxyfile but none exists in the opened resource, it gets prompt to create a new doxyfile. ADD task #4841 : Allow the user to configure the doxygen binary to use when doxygen invocation fails. This may occur when building or creating a doxyfile. A dialog asks the user to edit the preferences and shows the appropriate preference page when applicable. FIX bug #11598 : Editor crashes when looking for certain tags. Depending on doxygen version used to generated a doxyfile, some expected tags may not be defined. Now the editor disables user interface controls related to missing tags. FIX bug #10595 : NullPointerException while opening Doxyfile editor. See bug #11598. eclox-0.7.2 (29-apr-2008) FIX bug #10720 : Browsing for input folders. When adding an input folder entry and browsing for the where the doxyfile lies, the path was empty. Empty relative paths are now substituted with ".". ADD task #5722 : Remember selected doxyfile for building across eclipse restarts. Now the history of build doxyfiles is saved when eclipse shuts down and restore on start. eclox-0.7.1 (16-dec-2007) * bug #9693 : Bad console output when several workbench windows are open. This bug was the opportunity for a deep refactoring of the doxygen build console management. Now each doxyfile build job has its own console instance, each console is now able to create several console pages. As a result, console pages (displayed in the same workbench window or not) that point to the same console will show the same output. eclox-0.7.0 (8-dec-2007) * Creation of the hot update site, that provides latest eclox versions that are still in development. * task #4859 : Enhance the error reporting when doxygen invokation fails in the doxyfile creation wizard. When doxygen was not found, the user gets asked for preference edition, or not. When wanted, the preference dialog gets opened and the user can configure eclox to find doxygen. If changes gets validated, the doxyfile generation is started again, it is canceled otherwise. * task #5609 : Update README file. Changed "yellow question mark" by "@-sign in blue". * task #5524 : Workspace refresh after documentation builds. Once a doxygen build is finished, the resource container that received the documentation output is refreshed. eclox-0.6.5 (1-oct-2007) * bug #10074 : Right clicking on a closed project causes an Eclox error. Searching for doxyfiles into a closed project was not handled and ended in an exception. Thanks to slide_o_mix for the report. eclox-0.6.4 (19-sep-2007) * task #5127 : Use content types for the contextual build menu and for the editor. Contextual menu build action gets enhanced. It either launch doxygen when the selection is a doxyfile, prompt for a doxyfile to build when the selection contains doxyfiles or disables otherwise. * sr #1604 : Specially named doxyfiles. It is now possible to define custom doxyfile name and extensions. * task #5406 : Support new doxygen 1.5.3 settings * task #5405 : Bundle all windows and linux doxygen till 1.5.3 * task #5251 : Support new settings of doxygen 1.5.2 * task #4978 : Add navigation history in the advanced editor page. * Fixes bug #6024 : Multiple markers, entries in build history when building the same doxyfile from two perspectives. eclox-0.6.3 (24-apr-2007) * Fixes bug #8976 : Eclipse 3.2.2 (M20070212-1330) Can not create Doxyfile. The selection was expected to have the IResource interface. Now, when no IResource interface is found for the current selection, eclox tries to find an adapter to get it. eclox-0.6.2 (4-apr-2007) * Implements task #4978 : Add navigation history in the advanced editor page. * Fixes bug #8844 : Doxyfile Editor does not work with Version 0.6.1 on Eclipse 3.2.2. eclox-0.6.1 (1-apr-2007) * task #3126 : Enhance the doxyfile creation wizard. Initialize the new doxyfile name with the enclosing eclipse project. * task #4863 : Enhance the note for settings in the advanced editor page. Now layout and formatting are done in setting notes. Their are also hyperlinks to related settings, allowing a faster navigation. * task #4938 : Add resource decoration on doxyfiles being built. * task #4840 : Enhance the doxyfile editor with a new "overview" page. * Fixes bug #5983 : TAGFILES note missing. Since the enhancement of the setting note presentation, the note of this setting could be added. * Fixes bug #8809 : Wrong text for the GENERATE_HTMLHELP tag. * Fixes bug #8819 : In advanced editor page, selection change not shown. eclox-0.6.0 (1-mar-2007) * Add setting properties for REFERENCES_LINK_SOURCE. * Fix bug #8599 : Frozen doxyfile editor when clicking twice on a filter buttonWhen updating the user interface controls, redraw was disabled to avoid flickering. Redraw was not reactivated if the selected filter was not changing. * Fix bug #8593 : Editor hangs up when entering "custom" filter. The "text" property of a setting was missing and thus a null pointer was received while filtering the setting view. This null pointer was not well handled. * Fix bug #7276 : Problems with adding HTML-formatted aliases. Double-quotes and backslashes should be escapd well by now. * Add support for packaged doxygen binaries. Currently, only x86 windows and x86 linux are supported. * Add new feature allowing a user to specify one or more doxygen binary location. * Add new feature that detects any doxygen found in the path. eclox-0.5.5 (13-dec-2006) * Fix bug #7545 : "Save all editors before building" settings isn't preserved correctly across Eclipse restarts. A bad string equality test was used ("==" instead of "equals"). * Add sr #1296 : Marking finish of doxygen. A message is printed once the build job has finished. * Fix bug #7342 : Setting IGNORE_PREFIX is handled wrong. Changed boolean for text list. eclox-0.5.4 (05-sep-2006) * Fix bug #6740 : jar declared in classpath is missing. * Fix bug #6795 : unable to edit doxygen preferences. eclox-0.5.3 (20-aug-2006) * Fix bug #6265 concerning "enabled section" setting. * Fix bug #6109 concerning missing radio buttons when editing a boolean setting. * Fix editor icon black background problem. eclox-0.5.2 (24-may-2006) * Fix two bugs (#5980 and #5982) concerning the setting configuration file. * Fix two bugs (#5979 and #5981) on java VMs 1.4.2 since the released plugins where targeted for java 1.5. eclox-0.5.1 (20-may-2006) * Fix a bug in the directory browser dialog that caused the initial path to be invalid in some conditions. * Added build log analysis. So now problem reported by doxygen are converted to markers on files. This will help to find and fix mistakes in documentation blocks. * Fix the build options so the feature's about.ini is included. So now the feature description is available from ecllipse's about box. * Removed deprecated icons from the branding plugin. eclox-0.5.0 (16-may-2006) * Fix bug #5700. "Generate Tag File" was not using the right editor (was "boolean" and should have been "file"). * Fix bug #5927 : strip From Path option is incorrect. Also fixes bad type for STRIP_FROM_INC_PATH. * Fix wrong type for setting EXPAND_AS_DEFINED. * Refactored the code so that the core doxygen API is splitted from the ui implementation. And a branding plugin has been added. * The documentation building API has been deeply refactored. This brings improved output logging (now based on the eclipse's console API) and control over build jobs. * Fix bug #5719 : double quote escapes in setting values. Now it is possible for settings to support escaped quotes in their value when splitting. The ui part is now able to handle double quotes (un)escapes transparently and automatically. The user now interacts with the unescaped string version. When the edited string returns back to the doxyfile, it is automatically escaped. A preference allows the user to deactivate this bahviour (default is on). * Some icons have been updated (doxyfile, clear custom filter field and doxygen build action). * Now an editor automatically closes when its related doxyfile gets deleted from the workspace. * In the list editor, the focus management has been improved (after item removal for example). eclox-0.4.4 (08-mar-2006) * In the editor, double-clicking a setting brings the user directly to the edition controls. * In the editor, the custom filter has been implemented. Additionnaly, filter settings are remebered when switching from one to another. * In the editor, setting that have been edited are now marked until the doxyfile is saved. * In the editor, a "modified" filter has been added allowing to see only modified settings. Enhanced the setting property API to provide better notifications. Also enhanced the editor page refresh when switching from one filter to another. * In the editor, added support for directory path editor. Updated the editor type for following settings: HTML_OUTPUT, LATEX_OUTPUT, RTF_OUTPUT, MAN_OUTPUT, XML_OUTPUT and OUTPUT_DIRECTORY. * In the editor, added support for file path editor. Updated the editor type for following settings: INPUT_FILTER, HTML_HEADER, HTML_FOOTER, HTML_STYLESHEET, CHM_FILE, HCC_LOCATION, LATEX_HEADER, XML_SCHEMA, XML_DTD, PERL_PATH, DOT_PATH, FILE_VERSION_FILTER, WARN_LOGFILE. * In the editor, added support for list, directory list, and file/directory list editors. Updated the setting definitions of ALIASES, FILE_PATTERNS, EXCLUDE_PATTERNS, EXAMPLE_PATTERNS, INCLUDE_FILE_PATTERNS, PREDEFINED, INPUT, EXCLUDE, EXAMPLE_PATH, IMAGE_PATH to use these editors. * Updated the default editor icon. * In the editor, fixed bogus setting dirty status that was not cleaned when closing a non-saved editor and opening a new editor instance again. eclox-0.4.3 (13-dec-2005) * Added a boolean setting editor. * Added AUTHORS, CHANGES, COPYING, MANUAL, README and TODO files to all eclox projects (features and plug-ins). * Added a link to the doxygen's manual to eclipse help system. * Fixed a bug in the doxyfile choose dialog. eclox-0.4.1 (14-nov-2005) * This plugin has now a little brother contributing help to the eclipse's help system. * In the doxyfile editor, setting values are now shown directly in the setting list. * The parser now supports of @INCLUDE and @INCLUDE_PATH directives in doxyfiles (bug #2868). * The parser follows more accuratly doxygen's parsing method (reassigning a value to setting will override the previous assignment). eclox-0.4 (5-nov-2005) * Deep refactoring of the doxyfile content representation. * Recreation of the doxyfile editor using new ui APIs provided since eclipse 3.0. * Fixes bug #866 and support request #471. eclox-0.3.4 (8-oct-2004) * Bug fixed, the plugin crashed at startup. eclox-0.3.3 (6-oct-2004) * Automatic saving of all editors before buiding is now implemented and can be configured in the preferences. * The build history state is now persistent. * When opening the toolbar build action dropdown menu, "Choose Doxyfile" appears even when no previous build has been done. * Bug #815 fixed. The doxyfile parser now supports any possible line ending (CR, LF and CRLF). eclox-0.3.2 (06-sep-2004) * Bug fixed. Loading doxyfile crashed on tags without values. * Bug fixed. Saving doxyfile crashed on tags having no description bloc. * Improvement of error reports while loading doxyfiles. eclox-0.3.1 (28-jun-2004) * Fixed invalid build launched from the toolbar build button when the last doxyfile has been deleted. * Fixed unexpected exception when deleting a doxyfile resource while an editor was open on it. * Fixed a null pointer exception when launching a build from the history on a resource that has been removed. * Improvement of the properties of the doxyfile element selected in the outline view. * Fixed build history which was always empty since the use of workbench jobs for build processes. * Added properties for doxyfile elements in the default workbench property view. * Improved build error reporting tanks to the new jobs return status. * Bug fixed: the doxyfile editor has been restored. * Integration to Eclipse M9 api and removed the compatibility mode. * Support of the new eclipse Job API added. * Improvement of the message reporting rate in the build output log. eclox-0.3.0 (15-jun-2004) * Integration to Eclipse M8. eclox-0.2.2 (14-jun-2004) * bug #413 fixed, doxygen and eclipse freeze. * bug #410 fixed, when launching a new build, show an error when a build is already in progress. eclox-0.2.1 (04-jun-2004) * Manual updated. * The build toolbar action use the current selection to determine the doxyfile to build (current doxyfile editor, last built doxyfile, doxyfile selection in the resource explorer, ...). * The build toolbar action can now prompt the build history. * The contextual "build" menu action on doxyfiles has been restored. * Added the build history (with length preference). * Various clean-up (plugin preference class moved, icons moved to a dedicated folder, copyright date updated.) eclox-0.2.0 (03-jun-2004) * Creation of a new toolbar build button which asks the user for the doxyfile to build. * One more improvement of the tag edition. eclox-0.1.3 (03-may-2004) * The tag edition has been improved. While editing a tag, hitting ESC cancels the current edition, at the opposite, hitting ENTER validates the current edition. * The doxygen creation wizard has been fixed to support pathes with and without spaces under *nix. * The default doxygen command string match the exact *nix syntax, since those OS are case-sensitive. * In the doxyfile editor, the tag name column adjusts to the longest name. * Hints of the selected tag reactivated. * Deactivated the boolean field of the editor since the behaviour was not very handy. eclox-0.1.2 (23-feb-2004) * A brand new doxfile loader supporting files generated by various tools (like DoxWizard). Fixes bugs #241 and #245. * Creation of the change log file (this file). eclox-0.1.1 * Margins arround the editor controls has been removed. Spacing between these controls has been decreased to 1 pixel. Look's nicer. * Now, filenames that are recognized by the plugin contain either the "doxyfile" string as base name or as extension. eclox-0.1.0 * Code name set to 'bombarde'. * First available version! eclox/eclox/MANUAL0000644000076400007640000000545310723022410013272 0ustar willywilly Eclox, a Doxygen frontend plugin for Eclipse. 1. INSTALLATION There are two options to install the plugin: using the update site or using the packaged feature. The update site is the more convenient way to install eclox. It is located at . See eclipse's user guilde for additionnal details. When using the packaged feature, you must extract the archive content into your eclipse's root location. For additionnal details, please refer to eclipse's user guide. 2. CONFIGURATION Once the plugin installed, you must ensure that the default PATH environment variable makes the doxygen binary reachable for the plugin. If not, you can update PATH to include to directory containing the Doxygen binary, or you can tell Eclox where that binary is located on your system (which is in my opinion the better solution). To do this, open eclipse's preference edition dialog window and go into the new "Doxygen" section. 3. USAGE You can create new Doxygen projects (also called doxyfiles) using the creation wizard. Go to "File->New->Other->Other->Doxygen Configuration". Press next and set both file location and name. Then a empty doxyfile will be created at the specified location, the wizard automatically adds the ".Doxyfile" extension. You should now see a file with a blue @-sign icon. This is your new doxyfile. Double-clicking on it will open the editor. You can now browse and edit the settings. Once your have properly set all doxyfile fields, you can launch a documentation build using the toolbar icon showing a blue @-sign. In the case the button is not visible in the toolbar, your current perspective needs to get configured. Go to "Window->Customize perspective->Commands" and in "Available command groups" check "Doxygen". Additionnaly, you can browse the laetest builds by clicking the down arrow right to the toolbar button. When the documentation build starts, a new view showing the build log opens. In its toolbar, a button named "Stop" allows you to halt the current build process. The current build also appears in the Eclipse job progress view and you can control the job from there. The build toolbar action determine the next doxyfile to build depending on the current active workbench part (editor or view) and the current selection in that part. For example, if the active part is a doxyfile editor, the next doxyfile to build will be the one being edited. If the active part is the resource explorer and the current selection is a doxyfile, that doxyfile will be next to get build. In the case the active part selection doesn't correspond to a doxyfile, the last built doxyfile will be rebuiled. And if the build history is empty, you will be asked for the doxyfile to build.eclox/eclox/COPYING0000644000076400007640000002600412166012446013433 0ustar willywilly Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. *1. DEFINITIONS* "Contribution" means: a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and b) in the case of each subsequent Contributor: i) changes to the Program, and ii) additions to the Program; where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. "Contributor" means any person or entity that distributes the Program. "Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. "Recipient" means anyone who receives the Program under this Agreement, including all Contributors. *2. GRANT OF RIGHTS* a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. *3. REQUIREMENTS* A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: a) it complies with the terms and conditions of this Agreement; and b) its license agreement: i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. When the Program is made available in source code form: a) it must be made available under this Agreement; and b) a copy of this Agreement must be included with each copy of the Program. Contributors may not remove or alter any copyright notices contained within the Program. Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. *4. COMMERCIAL DISTRIBUTION* Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. *5. NO WARRANTY* EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. *6. DISCLAIMER OF LIABILITY* EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. *7. GENERAL* If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. eclox/eclox/build.properties0000644000076400007640000000110410500252156015601 0ustar willywillybin.includes = *.jar,\ COPYING,\ README,\ CHANGES,\ AUTHORS,\ MANUAL,\ META-INF/,\ eclox.png,\ about.ini,\ TODO src.includes = .project,\ .template,\ AUTHORS,\ CHANGES,\ COPYING,\ MANUAL,\ README,\ TODO,\ build.properties,\ META-INF/,\ about.ini,\ eclox.png,\ doc/ eclox/eclox/doc/0000755000076400007640000000000012166321432013141 5ustar willywillyeclox/eclox/doc/uml/0000755000076400007640000000000012166321432013736 5ustar willywillyeclox/eclox/doc/uml/components.dia0000644000076400007640000000236010273733206016606 0ustar willywillyZݎ62ժUՋV{ӽF]c# M3@ji`wc߱^x!2OL, |!ÉߞfMi {!.17^AiVLa xU`͓Z @`춃+\5t C&:ˆ(UÃ\/F黅4y#`w(Fc>#@ RLUܡ9!+s3+#џ̞Pvkٱ[h_aK.v:!]Ow/Q^T9nM6NK:q18 9Օͬ?oI{=vjs.6-ߓΧҧ=k6eclox/eclox/.cvsignore0000644000076400007640000000001610101727363014371 0ustar willywilly.classpath bineclox/eclox/.project0000644000076400007640000000117610007737553014057 0ustar willywilly eclox org.eclipse.jdt.core.javabuilder org.eclipse.pde.ManifestBuilder org.eclipse.pde.SchemaBuilder org.eclipse.pde.PluginNature org.eclipse.jdt.core.javanature eclox/eclox/.template0000644000076400007640000000163010007737553014217 0ustar willywilly

Tips on working with this plug-in project

  • For the view of the new plug-in at a glance, go to the Overview.
  • You can test the contributions of this plug-in by launching another instance of the workbench. On the Run menu, click Run As and choose Run-time Workbench from the available choices.
  • You can add more functionality to this plug-in by adding extensions using the New Extension Wizard.
  • The plug-in project contains Java code that you can debug. Place breakpoints in Java classes. On the Run menu, select Debug As and choose Run-time Workbench from the available choices.