diff --git a/com.hazard157.prisex24/.settings/org.eclipse.core.resources.prefs b/com.hazard157.prisex24/.settings/org.eclipse.core.resources.prefs index 7ba2325..1c58c6a 100644 --- a/com.hazard157.prisex24/.settings/org.eclipse.core.resources.prefs +++ b/com.hazard157.prisex24/.settings/org.eclipse.core.resources.prefs @@ -2,6 +2,8 @@ eclipse.preferences.version=1 encoding//OSGI-INF/l10n/bundle.properties=UTF-8 encoding//OSGI-INF/l10n/bundle_ka_GE.properties=UTF-8 encoding//OSGI-INF/l10n/bundle_ru_RU.properties=UTF-8 +encoding//src/com/hazard157/prisex24/m5/todos/messages_ka_GE.properties=UTF-8 +encoding//src/com/hazard157/prisex24/m5/todos/messages_ru_RU.properties=UTF-8 encoding//src/com/hazard157/prisex24/messages.properties=UTF-8 encoding//src/com/hazard157/prisex24/messages_ka_GE.properties=UTF-8 encoding//src/com/hazard157/prisex24/messages_ru_RU.properties=UTF-8 diff --git a/com.hazard157.prisex24/META-INF/MANIFEST.MF b/com.hazard157.prisex24/META-INF/MANIFEST.MF index f3df5c8..0062871 100644 --- a/com.hazard157.prisex24/META-INF/MANIFEST.MF +++ b/com.hazard157.prisex24/META-INF/MANIFEST.MF @@ -4,6 +4,7 @@ Bundle-Name: Prisex24 Bundle-SymbolicName: com.hazard157.prisex24;singleton:=true Bundle-Version: 1.0.0.qualifier Export-Package: com.hazard157.prisex24, + com.hazard157.prisex24.devel, com.hazard157.prisex24.e4.addons Bundle-Activator: com.hazard157.prisex24.Activator Bundle-Vendor: HAZARD157 @@ -17,11 +18,15 @@ Require-Bundle: javax.annotation, org.eclipse.e4.ui.workbench, org.eclipse.pde.ds.lib, org.toxsoft.core.tslib, + org.toxsoft.core.txtproj.lib, + org.toxsoft.core.txtproj.gui, + org.toxsoft.core.txtproj.mws, org.toxsoft.core.singlesrc.rcp, org.toxsoft.core.tsgui.rcp, org.toxsoft.core.tsgui, org.toxsoft.core.tsgui.mws, - org.toxsoft.core.txtproj.lib + com.hazard157.common, + com.hazard157.psx.proj3 Bundle-RequiredExecutionEnvironment: JavaSE-17 Automatic-Module-Name: com.hazard157.prisex24 Bundle-ActivationPolicy: lazy diff --git a/com.hazard157.prisex24/OSGI-INF/l10n/bundle.properties b/com.hazard157.prisex24/OSGI-INF/l10n/bundle.properties index a36c7e1..d7321ff 100644 --- a/com.hazard157.prisex24/OSGI-INF/l10n/bundle.properties +++ b/com.hazard157.prisex24/OSGI-INF/l10n/bundle.properties @@ -23,5 +23,7 @@ Uipart_Episodes_List = Episodes Uipart_Episodes_List_D = Episodes list Uipart_Refbook_Sourcevids = Source videos Uipart_Refbook_Sourcevids_D = All source videos of all episodes +Uipart_Refbook_Todos = Todos +Uipart_Refbook_Todos_D = Work with a list of all tasks and todos Uipart_Svins_Frames = Svins frames Uipart_Svins_Frames_D = Svins frames diff --git a/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ka_GE.properties b/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ka_GE.properties index ef943f6..73c808f 100644 --- a/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ka_GE.properties +++ b/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ka_GE.properties @@ -23,5 +23,7 @@ Uipart_Episodes_List = ეპიზოდები Uipart_Episodes_List_D = ეპიზოდების სია Uipart_Refbook_Sourcevids = Source videos Uipart_Refbook_Sourcevids_D = All source videos of all episodes +Uipart_Refbook_Todos = საქმეები +Uipart_Refbook_Todos_D = მუშაობა ყველა ამოცანისა და შემთხვევის ჩამონათვალით Uipart_Svins_Frames = ინტერვალების კადრები Uipart_Svins_Frames_D = ინტერვალების კადრები diff --git a/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ru_RU.properties b/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ru_RU.properties index aed7ac2..dd63bb5 100644 --- a/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ru_RU.properties +++ b/com.hazard157.prisex24/OSGI-INF/l10n/bundle_ru_RU.properties @@ -23,5 +23,7 @@ Uipart_Episodes_List = Эпизоды Uipart_Episodes_List_D = Список эпизодов Uipart_Refbook_Sourcevids = Исходные видео Uipart_Refbook_Sourcevids_D = Список всех исходных видео всех эпизодов +Uipart_Refbook_Todos = Дела +Uipart_Refbook_Todos_D = Работа со списком всех задач и дел Uipart_Svins_Frames = Кадры интервалов Uipart_Svins_Frames_D = Кадры интервалов diff --git a/com.hazard157.prisex24/fragment.e4xmi b/com.hazard157.prisex24/fragment.e4xmi index 4608f8c..32adcb8 100644 --- a/com.hazard157.prisex24/fragment.e4xmi +++ b/com.hazard157.prisex24/fragment.e4xmi @@ -1,11 +1,29 @@ - + - - + + + + + + + + + + + + + + + + + + + + diff --git a/com.hazard157.prisex24/icons/is128x128/todo-item-dimmed.png b/com.hazard157.prisex24/icons/is128x128/todo-item-dimmed.png new file mode 100644 index 0000000..a8f65a2 Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/todo-item.png b/com.hazard157.prisex24/icons/is128x128/todo-item.png new file mode 100644 index 0000000..f623f42 Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/is128x128/todos-list.png b/com.hazard157.prisex24/icons/is128x128/todos-list.png new file mode 100644 index 0000000..3cae51a Binary files /dev/null and b/com.hazard157.prisex24/icons/is128x128/todos-list.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/todo-item-dimmed.png b/com.hazard157.prisex24/icons/is16x16/todo-item-dimmed.png new file mode 100644 index 0000000..7b220d9 Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/todo-item.png b/com.hazard157.prisex24/icons/is16x16/todo-item.png new file mode 100644 index 0000000..244c744 Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/is16x16/todos-list.png b/com.hazard157.prisex24/icons/is16x16/todos-list.png new file mode 100644 index 0000000..9924aa6 Binary files /dev/null and b/com.hazard157.prisex24/icons/is16x16/todos-list.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/todo-item-dimmed.png b/com.hazard157.prisex24/icons/is24x24/todo-item-dimmed.png new file mode 100644 index 0000000..4c50119 Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/todo-item.png b/com.hazard157.prisex24/icons/is24x24/todo-item.png new file mode 100644 index 0000000..fd4c8eb Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/is24x24/todos-list.png b/com.hazard157.prisex24/icons/is24x24/todos-list.png new file mode 100644 index 0000000..5371fe1 Binary files /dev/null and b/com.hazard157.prisex24/icons/is24x24/todos-list.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/todo-item-dimmed.png b/com.hazard157.prisex24/icons/is32x32/todo-item-dimmed.png new file mode 100644 index 0000000..0096fa4 Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/todo-item.png b/com.hazard157.prisex24/icons/is32x32/todo-item.png new file mode 100644 index 0000000..a077c7d Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/is32x32/todos-list.png b/com.hazard157.prisex24/icons/is32x32/todos-list.png new file mode 100644 index 0000000..3fe57dc Binary files /dev/null and b/com.hazard157.prisex24/icons/is32x32/todos-list.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/todo-item-dimmed.png b/com.hazard157.prisex24/icons/is48x48/todo-item-dimmed.png new file mode 100644 index 0000000..50626ae Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/todo-item.png b/com.hazard157.prisex24/icons/is48x48/todo-item.png new file mode 100644 index 0000000..46a6c1f Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/is48x48/todos-list.png b/com.hazard157.prisex24/icons/is48x48/todos-list.png new file mode 100644 index 0000000..5a4db87 Binary files /dev/null and b/com.hazard157.prisex24/icons/is48x48/todos-list.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/todo-item-dimmed.png b/com.hazard157.prisex24/icons/is64x64/todo-item-dimmed.png new file mode 100644 index 0000000..bac5e5f Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/todo-item.png b/com.hazard157.prisex24/icons/is64x64/todo-item.png new file mode 100644 index 0000000..a4421e9 Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/is64x64/todos-list.png b/com.hazard157.prisex24/icons/is64x64/todos-list.png new file mode 100644 index 0000000..c84469d Binary files /dev/null and b/com.hazard157.prisex24/icons/is64x64/todos-list.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/todo-item-dimmed.png b/com.hazard157.prisex24/icons/is96x96/todo-item-dimmed.png new file mode 100644 index 0000000..55e6107 Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/todo-item.png b/com.hazard157.prisex24/icons/is96x96/todo-item.png new file mode 100644 index 0000000..a134ce3 Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/is96x96/todos-list.png b/com.hazard157.prisex24/icons/is96x96/todos-list.png new file mode 100644 index 0000000..4f3a47f Binary files /dev/null and b/com.hazard157.prisex24/icons/is96x96/todos-list.png differ diff --git a/com.hazard157.prisex24/icons/todo-item-dimmed.png b/com.hazard157.prisex24/icons/todo-item-dimmed.png new file mode 100644 index 0000000..a8f65a2 Binary files /dev/null and b/com.hazard157.prisex24/icons/todo-item-dimmed.png differ diff --git a/com.hazard157.prisex24/icons/todo-item.png b/com.hazard157.prisex24/icons/todo-item.png new file mode 100644 index 0000000..f623f42 Binary files /dev/null and b/com.hazard157.prisex24/icons/todo-item.png differ diff --git a/com.hazard157.prisex24/icons/todos-list.png b/com.hazard157.prisex24/icons/todos-list.png new file mode 100644 index 0000000..3cae51a Binary files /dev/null and b/com.hazard157.prisex24/icons/todos-list.png differ diff --git a/com.hazard157.prisex24/splash.bmp b/com.hazard157.prisex24/splash1.bmp similarity index 100% rename from com.hazard157.prisex24/splash.bmp rename to com.hazard157.prisex24/splash1.bmp diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/Activator.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/Activator.java index 10d6f3e..56b77de 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/Activator.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/Activator.java @@ -1,6 +1,18 @@ package com.hazard157.prisex24; +import static com.hazard157.prisex24.IPrisex24CoreConstants.*; +import static org.toxsoft.core.tslib.av.impl.AvUtils.*; +import static org.toxsoft.core.txtproj.mws.IUnitTxtprojMwsConstants.*; + +import java.io.*; + +import org.eclipse.osgi.service.environment.*; import org.toxsoft.core.tsgui.mws.bases.*; +import org.toxsoft.core.tsgui.mws.osgi.*; +import org.toxsoft.core.tslib.bricks.apprefs.impl.*; +import org.toxsoft.core.tslib.utils.progargs.*; + +import com.hazard157.psx.proj3.*; /** * The plugin activator. @@ -15,6 +27,16 @@ public class Activator */ public static final String PLUGIN_ID = "com.hazard157.prisex24"; //$NON-NLS-1$ + /** + * Command line argument with configuration file name. + */ + public static final String CMDLINE_ARG_CFG_FILE_NAME = "config"; //$NON-NLS-1$ + + /** + * Default configuration file name (located in the startup directory). + */ + public static final String DEFAULT_CFG_FILE_NAME = APP_ALIAS + ".cfg"; //$NON-NLS-1$ + private static Activator instance = null; /** @@ -26,6 +48,26 @@ public Activator() { instance = this; } + @Override + protected void doStart() { + IMwsOsgiService mws = findOsgiService( IMwsOsgiService.class ); + mws.setAppInfo( APP_INFO ); + // configure TsProject plugin + OPDEF_SHOW_CMD_IN_TOOLBAR.setValue( mws.context().params(), AV_TRUE ); + OPDEF_SHOW_CMD_IN_MENU.setValue( mws.context().params(), AV_TRUE ); + OPDEF_ALWAYS_USE_FILE_MENU.setValue( mws.context().params(), AV_TRUE ); + OPDEF_IMMEDIATE_LOAD_PROJ.setValue( mws.context().params(), AV_TRUE ); + OPDEF_PROJECT_FILE_FORMAT_INFO.setValue( mws.context().params(), + avValobj( QuantPsx3Project.PROJECT_FILE_FORMAT_INFO ) ); + // application preferences will be stored in the config file + EnvironmentInfo envInfo = getOsgiService( EnvironmentInfo.class ); + ProgramArgs pa = new ProgramArgs( envInfo.getCommandLineArgs() ); + String cfgFileName = pa.getArgValue( CMDLINE_ARG_CFG_FILE_NAME, DEFAULT_CFG_FILE_NAME ); + File cfgFile = new File( cfgFileName ); + AbstractAppPreferencesStorage apStorage = new AppPreferencesConfigIniStorage( cfgFile ); + mws.context().put( AbstractAppPreferencesStorage.class, apStorage ); + } + /** * Returns the reference to the activator singleton. * diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java index 4ff8e60..1587c86 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/IPrisex24CoreConstants.java @@ -34,12 +34,21 @@ public interface IPrisex24CoreConstants { String PSX_M5_ID = PSX_ID + ".m5"; //$NON-NLS-1$ String PSX_ACT_ID = PSX_ID + ".act"; //$NON-NLS-1$ + // ------------------------------------------------------------------------------------ + // E4 + + String PERSPID_REFBOOKS = "com.hazard157.prisex24.persp.refbooks"; //$NON-NLS-1$ + String PARTSTACKID_REFBOOKS = "com.hazard157.prisex24.partstack.refbooks"; //$NON-NLS-1$ + // ------------------------------------------------------------------------------------ // Icons - String PREFIX_OF_ICON_FIELD_NAME = "ICONID_"; //$NON-NLS-1$ - String ICONID_APP_ICON = "app-icon"; //$NON-NLS-1$ - String ICONID_PORNICON = "pornicon"; //$NON-NLS-1$ + String PREFIX_OF_ICON_FIELD_NAME = "ICONID_"; //$NON-NLS-1$ + String ICONID_APP_ICON = "app-icon"; //$NON-NLS-1$ + String ICONID_PORNICON = "pornicon"; //$NON-NLS-1$ + String ICONID_TODO_ITEM = "todo-item"; //$NON-NLS-1$ + String ICONID_TODO_ITEM_DIMMED = "todo-item-dimmed"; //$NON-NLS-1$ + String ICONID_TODOS_LIST = "todos-list"; //$NON-NLS-1$ /** * Constants registration. diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/Addon05Prisex24WindowsSize.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/Addon05Prisex24WindowsSize.java deleted file mode 100644 index 3fc70e5..0000000 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/Addon05Prisex24WindowsSize.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.hazard157.prisex24.e4.addons; - -import static com.hazard157.prisex24.Activator.*; - -import org.eclipse.e4.core.contexts.*; -import org.eclipse.e4.ui.model.application.*; -import org.eclipse.e4.ui.model.application.ui.basic.*; -import org.eclipse.e4.ui.workbench.modeling.*; -import org.eclipse.swt.graphics.*; -import org.eclipse.swt.widgets.*; -import org.toxsoft.core.tsgui.mws.*; -import org.toxsoft.core.tsgui.mws.bases.*; -import org.toxsoft.core.tslib.utils.progargs.*; - -/** - * Application addon. - * - * @author hazard157 - */ -public class Addon05Prisex24WindowsSize - extends MwsAbstractAddon { - - /** - * If this command line argument is specified, the main window will have small size for debugging convenience. - */ - public static final String CMDLINEARG_MAIN_WINDOW_DEBUG_SIZE = "MainWindowDebugSize"; //$NON-NLS-1$ - - /** - * Constructor. - */ - public Addon05Prisex24WindowsSize() { - super( PLUGIN_ID ); - } - - @Override - protected void initApp( IEclipseContext aAppContext ) { - MApplication app = aAppContext.get( MApplication.class ); - EModelService modelService = aAppContext.get( EModelService.class ); - MTrimmedWindow mainWindow = (MTrimmedWindow)modelService.find( IMwsCoreConstants.MWSID_WINDOW_MAIN, app ); - // initial size of window - ProgramArgs programArgs = aAppContext.get( ProgramArgs.class ); - if( programArgs.hasArg( CMDLINEARG_MAIN_WINDOW_DEBUG_SIZE ) ) { // initial size of the window SMALL - Display display = aAppContext.get( Display.class ); - Rectangle dBounds = display.getBounds(); - int dx = dBounds.width / 8; - int dy = dBounds.height / 8; - mainWindow.setX( 4 * dx ); - mainWindow.setY( 2 * dy ); - mainWindow.setWidth( 3 * dx ); - mainWindow.setHeight( 5 * dy ); - } - else { // initial size of the window BIG - Display display = aAppContext.get( Display.class ); - Rectangle dBounds = display.getBounds(); - mainWindow.setX( dBounds.x + 8 ); - mainWindow.setY( 0 ); - mainWindow.setWidth( dBounds.width - 4 * 8 ); - mainWindow.setHeight( dBounds.height ); - } - } - - @Override - protected void initWin( IEclipseContext aWinContext ) { - // nop - } - -} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/Addon00Prisex24Core.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Core.java similarity index 83% rename from com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/Addon00Prisex24Core.java rename to com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Core.java index cfff3d4..3929d4b 100644 --- a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/Addon00Prisex24Core.java +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/addons/AddonPrisex24Core.java @@ -11,6 +11,7 @@ import org.eclipse.swt.graphics.*; import org.toxsoft.core.tsgui.bricks.quant.*; import org.toxsoft.core.tsgui.graphics.icons.impl.*; +import org.toxsoft.core.tsgui.m5.*; import org.toxsoft.core.tsgui.mws.*; import org.toxsoft.core.tsgui.mws.bases.*; import org.toxsoft.core.tsgui.rcp.*; @@ -18,19 +19,21 @@ import com.hazard157.prisex24.*; import com.hazard157.prisex24.Activator; +import com.hazard157.prisex24.m5.todos.*; +import com.hazard157.psx.proj3.*; /** * Plugin addon. * * @author hazard157 */ -public class Addon00Prisex24Core +public class AddonPrisex24Core extends MwsAbstractAddon { /** * Constructor. */ - public Addon00Prisex24Core() { + public AddonPrisex24Core() { super( Activator.PLUGIN_ID ); } @@ -41,6 +44,7 @@ public Addon00Prisex24Core() { @Override protected void doRegisterQuants( IQuantRegistrator aQuantRegistrator ) { aQuantRegistrator.registerQuant( new QuantTsGuiRcp() ); + aQuantRegistrator.registerQuant( new QuantPsx3Project() ); } @Override @@ -55,6 +59,11 @@ protected void initApp( IEclipseContext aAppContext ) { @Override protected void initWin( IEclipseContext aWinContext ) { IPrisex24CoreConstants.init( aWinContext ); + // M5 + IM5Domain m5 = aWinContext.get( IM5Domain.class ); + m5.addModel( new FulfilStageM5Model() ); + m5.addModel( new TodoM5Model() ); + // DEBUG --- resource tracking Resource.setNonDisposeHandler( aT -> { TsTestUtils.pl( "ResourseErr: %s", aT.toString() ); //$NON-NLS-1$ diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/UipartRefbookTodos.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/UipartRefbookTodos.java new file mode 100644 index 0000000..c57c9bb --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/e4/uiparts/UipartRefbookTodos.java @@ -0,0 +1,36 @@ +package com.hazard157.prisex24.e4.uiparts; + +import javax.inject.*; + +import org.eclipse.swt.widgets.*; +import org.toxsoft.core.tsgui.bricks.ctx.*; +import org.toxsoft.core.tsgui.bricks.ctx.impl.*; +import org.toxsoft.core.tsgui.m5.*; +import org.toxsoft.core.tsgui.m5.gui.panels.*; +import org.toxsoft.core.tsgui.m5.model.*; +import org.toxsoft.core.tsgui.mws.bases.*; + +import com.hazard157.prisex24.m5.*; +import com.hazard157.psx.proj3.todos.*; + +/** + * UIpart: project todos refbook. + * + * @author hazard157 + */ +public class UipartRefbookTodos + extends MwsAbstractPart { + + @Inject + IUnitTodos unitTodos; + + @Override + protected void doInit( Composite aParent ) { + IM5Model todoModel = m5().getModel( IPsxM5Constants.MID_TODO, ITodo.class ); + ITsGuiContext ctx = new TsGuiContext( tsContext() ); + IM5LifecycleManager lm = todoModel.getLifecycleManager( unitTodos ); + IM5CollectionPanel todoPanel = todoModel.panelCreator().createCollEditPanel( ctx, lm.itemsProvider(), lm ); + todoPanel.createControl( aParent ); + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/IPsxM5Constants.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/IPsxM5Constants.java new file mode 100644 index 0000000..58ad13d --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/IPsxM5Constants.java @@ -0,0 +1,26 @@ +package com.hazard157.prisex24.m5; + +import static com.hazard157.prisex24.IPrisex24CoreConstants.*; + +/** + * PRISEX M5-modeling constants. + * + * @author hazard157 + */ +@SuppressWarnings( "javadoc" ) +public interface IPsxM5Constants { + + String MID_TODO = PSX_ID + ".Todo"; //$NON-NLS-1$ + String FID_NOTE = "Note"; //$NON-NLS-1$ + String FID_CREATION_TIME = "CreationTime"; //$NON-NLS-1$ + String FID_PRIORITY = "Priority"; //$NON-NLS-1$ + String FID_TEXT = "Text"; //$NON-NLS-1$ + String FID_IS_DONE = "IsDone"; //$NON-NLS-1$ + String FID_TODO_ID = "TodoId"; //$NON-NLS-1$ + String FID_RELATED_TODO_IDS = "RelatedTodoIds"; //$NON-NLS-1$ + String FID_FULFIL_STAGES = "FulfilStages"; //$NON-NLS-1$ + + String MID_FULFIL_STAGE = PSX_ID + "FulfilStage"; //$NON-NLS-1$ + String FID_WHEN = "When"; //$NON-NLS-1$ + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/FulfilStageM5Model.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/FulfilStageM5Model.java new file mode 100644 index 0000000..12c4d3a --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/FulfilStageM5Model.java @@ -0,0 +1,139 @@ +package com.hazard157.prisex24.m5.todos; + +import static com.hazard157.prisex24.m5.IPsxM5Constants.*; +import static com.hazard157.prisex24.m5.todos.IPsxResources.*; +import static org.toxsoft.core.tsgui.m5.IM5Constants.*; +import static org.toxsoft.core.tsgui.m5.gui.mpc.IMultiPaneComponentConstants.*; +import static org.toxsoft.core.tsgui.valed.api.IValedControlConstants.*; +import static org.toxsoft.core.tslib.av.EAtomicType.*; +import static org.toxsoft.core.tslib.av.impl.AvUtils.*; +import static org.toxsoft.core.tslib.av.metainfo.IAvMetaConstants.*; + +import java.sql.*; + +import org.toxsoft.core.tsgui.bricks.ctx.*; +import org.toxsoft.core.tsgui.m5.*; +import org.toxsoft.core.tsgui.m5.gui.mpc.impl.*; +import org.toxsoft.core.tsgui.m5.gui.panels.*; +import org.toxsoft.core.tsgui.m5.gui.panels.impl.*; +import org.toxsoft.core.tsgui.m5.model.*; +import org.toxsoft.core.tsgui.m5.model.impl.*; +import org.toxsoft.core.tsgui.utils.layout.*; +import org.toxsoft.core.tslib.av.*; + +import com.hazard157.psx.proj3.todos.*; +import com.hazard157.psx.proj3.todos.impl.*; + +/** + * {@link IFulfilStage} M5 model. + * + * @author hazard157 + */ +public class FulfilStageM5Model + extends M5Model { + + /** + * {@link IFulfilStage#when()} + */ + public static final IM5AttributeFieldDef WHEN = new M5AttributeFieldDef<>( FID_WHEN, TIMESTAMP, // + TSID_NAME, STR_FS_WHEN, // + TSID_DESCRIPTION, STR_FS_WHEN_D, // + M5_OPID_FLAGS, avInt( M5FF_COLUMN ) // + ) { + + @Override + protected IAtomicValue doGetFieldValue( IFulfilStage aEntity ) { + return avTimestamp( aEntity.when() ); + } + }; + + /** + * {@link IFulfilStage#name()} + */ + public static final IM5AttributeFieldDef NAME = new M5AttributeFieldDef<>( FID_NAME, STRING, // + TSID_NAME, STR_FS_NAME, // + TSID_DESCRIPTION, STR_FS_NAME_D, // + M5_OPID_FLAGS, avInt( M5FF_COLUMN ) // + ) { + + @Override + protected IAtomicValue doGetFieldValue( IFulfilStage aEntity ) { + return avStr( aEntity.name() ); + } + }; + + /** + * {@link IFulfilStage#description()} + */ + public static final IM5AttributeFieldDef DESCRIPTION = + new M5AttributeFieldDef<>( FID_DESCRIPTION, DDEF_DESCRIPTION ) { + + @Override + protected void doInit() { + setNameAndDescription( STR_FS_DESCRIPTION, STR_FS_DESCRIPTION_D ); + params().setValueIfNull( OPID_VERTICAL_SPAN, avInt( 5 ) ); + setFlags( M5FF_DETAIL ); + } + + @Override + protected IAtomicValue doGetFieldValue( IFulfilStage aEntity ) { + return avStr( aEntity.description() ); + } + }; + + /** + * Constructor. + */ + public FulfilStageM5Model() { + super( MID_FULFIL_STAGE, IFulfilStage.class ); + setNameAndDescription( STR_M5M_FULFIL_STAGE, STR_M5M_FULFIL_STAGE_D ); + addFieldDefs( WHEN, NAME, DESCRIPTION ); + setPanelCreator( new M5DefaultPanelCreator<>() { + + @Override + protected IM5CollectionPanel doCreateCollEditPanel( ITsGuiContext aContext, + IM5ItemsProvider aItemsProvider, IM5LifecycleManager aLifecycleManager ) { + // TODO Auto-generated method stub + OPDEF_IS_ACTIONS_CRUD.setValue( aContext.params(), AV_TRUE ); + OPDEF_IS_FILTER_PANE.setValue( aContext.params(), AV_TRUE ); + OPDEF_DETAILS_PANE_PLACE.setValue( aContext.params(), avValobj( EBorderLayoutPlacement.SOUTH ) ); + MultiPaneComponentModown mpc = + new MultiPaneComponentModown<>( aContext, model(), aItemsProvider, aLifecycleManager ) { + + @Override + protected void doAdjustEntityCreationInitialValues( IM5BunchEdit aValues ) { + aValues.set( FID_WHEN, avTimestamp( new Timestamp( System.currentTimeMillis() ).getTime() ) ); + } + + }; + return new M5CollectionPanelMpcModownWrapper<>( mpc, false ); + } + } ); + } + + @Override + protected IM5LifecycleManager doCreateDefaultLifecycleManager() { + return new M5LifecycleManager<>( this, true, true, true, false, null ) { + + @Override + protected IFulfilStage doCreate( IM5Bunch aValues ) { + long when = aValues.getAsAv( FID_WHEN ).asLong(); + String name = aValues.getAsAv( FID_NAME ).asString(); + String description = aValues.getAsAv( FID_DESCRIPTION ).asString(); + return new FulfilStage( when, name, description ); + } + + @Override + protected IFulfilStage doEdit( IM5Bunch aValues ) { + return create( aValues ); + } + + @Override + protected void doRemove( IFulfilStage aEntity ) { + // nop + } + + }; + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/IPsxResources.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/IPsxResources.java new file mode 100644 index 0000000..e7666f8 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/IPsxResources.java @@ -0,0 +1,68 @@ +package com.hazard157.prisex24.m5.todos; + +import com.hazard157.psx.proj3.todos.*; + +/** + * Localizable resources. + * + * @author hazard157 + */ +interface IPsxResources { + + /** + * {@link FulfilStageM5Model} + */ + String STR_M5M_FULFIL_STAGE = Messages.getString( "STR_M5M_FULFIL_STAGE" ); //$NON-NLS-1$ + String STR_M5M_FULFIL_STAGE_D = Messages.getString( "STR_M5M_FULFIL_STAGE_D" ); //$NON-NLS-1$ + String STR_FS_WHEN = Messages.getString( "STR_FS_WHEN" ); //$NON-NLS-1$ + String STR_FS_WHEN_D = Messages.getString( "STR_FS_WHEN_D" ); //$NON-NLS-1$ + String STR_FS_NAME = Messages.getString( "STR_FS_NAME" ); //$NON-NLS-1$ + String STR_FS_NAME_D = Messages.getString( "STR_FS_NAME_D" ); //$NON-NLS-1$ + String STR_FS_DESCRIPTION = Messages.getString( "STR_FS_DESCRIPTION" ); //$NON-NLS-1$ + String STR_FS_DESCRIPTION_D = Messages.getString( "STR_FS_DESCRIPTION_D" ); //$NON-NLS-1$ + + /** + * {@link TodoM5ModelPanelCreator} + */ + String TAB_TODO_PROPS = Messages.getString( "TAB_TODO_PROPS" ); //$NON-NLS-1$ + String TAB_TODO_PROPS_D = Messages.getString( "TAB_TODO_PROPS_D" ); //$NON-NLS-1$ + String TAB_TODO_TODOS = Messages.getString( "TAB_TODO_TODOS" ); //$NON-NLS-1$ + String TAB_TODO_TODOS_D = Messages.getString( "TAB_TODO_TODOS_D" ); //$NON-NLS-1$ + String TAB_TODO_STAGES = Messages.getString( "TAB_TODO_STAGES" ); //$NON-NLS-1$ + String TAB_TODO_STAGES_D = Messages.getString( "TAB_TODO_STAGES_D" ); //$NON-NLS-1$ + + /** + * {@link ITodo} + */ + String STR_M5M_TODO = Messages.getString( "STR_M5M_TODO" ); //$NON-NLS-1$ + String STR_M5M_TODO_D = Messages.getString( "STR_M5M_TODO_D" ); //$NON-NLS-1$ + String STR_TD_TODO_ID = Messages.getString( "STR_TD_TODO_ID" ); //$NON-NLS-1$ + String STR_TD_TODO_ID_D = Messages.getString( "STR_TD_TODO_ID_D" ); //$NON-NLS-1$ + String STR_TD_CREATION_TIME = Messages.getString( "STR_TD_CREATION_TIME" ); //$NON-NLS-1$ + String STR_TD_CREATION_TIME_D = Messages.getString( "STR_TD_CREATION_TIME_D" ); //$NON-NLS-1$ + String STR_TD_TEXT = Messages.getString( "STR_TD_TEXT" ); //$NON-NLS-1$ + String STR_TD_TEXT_D = Messages.getString( "STR_TD_TEXT_D" ); //$NON-NLS-1$ + String STR_TD_NOTE = Messages.getString( "STR_TD_NOTE" ); //$NON-NLS-1$ + String STR_TD_NOTE_D = Messages.getString( "STR_TD_NOTE_D" ); //$NON-NLS-1$ + String STR_TD_IS_DONE = Messages.getString( "STR_TD_IS_DONE" ); //$NON-NLS-1$ + String STR_TD_IS_DONE_D = Messages.getString( "STR_TD_IS_DONE_D" ); //$NON-NLS-1$ + String STR_TD_PRIORITY = Messages.getString( "STR_TD_PRIORITY" ); //$NON-NLS-1$ + String STR_TD_PRIORITY_D = Messages.getString( "STR_TD_PRIORITY_D" ); //$NON-NLS-1$ + String STR_TD_RELATED_TODOS = Messages.getString( "STR_TD_RELATED_TODOS" ); //$NON-NLS-1$ + String STR_TD_RELATED_TODOS_D = Messages.getString( "STR_TD_RELATED_TODOS_D" ); //$NON-NLS-1$ + String STR_TD_REMONDER = Messages.getString( "STR_TD_REMINDER" ); //$NON-NLS-1$ + String STR_TD_REMINDER_D = Messages.getString( "STR_TD_REMINDER_D" ); //$NON-NLS-1$ + String STR_TD_FULFIL_STAGES = Messages.getString( "STR_TD_FULFIL_STAGES" ); //$NON-NLS-1$ + String STR_TD_FULFIL_STAGES_D = Messages.getString( "STR_TD_FULFIL_STAGES_D" ); //$NON-NLS-1$ + + /** + * {@link TodoM5ModelPanelCreator} + */ + String STR_NODE_DONE = Messages.getString( "STR_NODE_DONE" ); //$NON-NLS-1$ + String STR_NODE_UNDONE = Messages.getString( "STR_NODE_UNDONE" ); //$NON-NLS-1$ + String STR_TMM_BY_DONE = Messages.getString( "STR_TMM_BY_DONE" ); //$NON-NLS-1$ + String STR_TMM_BY_DONE_D = Messages.getString( "STR_TMM_BY_DONE_D" ); //$NON-NLS-1$ + String STR_TMM_BY_PRIORITY = Messages.getString( "STR_TMM_BY_PRIORITY" ); //$NON-NLS-1$ + String STR_TMM_BY_PRIORITY_D = Messages.getString( "STR_TMM_BY_PRIORITY_D" ); //$NON-NLS-1$ + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/Messages.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/Messages.java new file mode 100644 index 0000000..0702068 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/Messages.java @@ -0,0 +1,24 @@ +package com.hazard157.prisex24.m5.todos; + +import java.util.*; + +@SuppressWarnings( "javadoc" ) +public class Messages { + + private static final String BUNDLE_NAME = Messages.class.getName().toLowerCase(); + + private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME ); + + private Messages() { + } + + public static String getString( String aKey ) { + try { + return RESOURCE_BUNDLE.getString( aKey ); + } + catch( @SuppressWarnings( "unused" ) MissingResourceException e ) { + return '!' + aKey + '!'; + } + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5LifecycleManager.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5LifecycleManager.java new file mode 100644 index 0000000..9837a31 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5LifecycleManager.java @@ -0,0 +1,68 @@ +package com.hazard157.prisex24.m5.todos; + +import static com.hazard157.prisex24.m5.IPsxM5Constants.*; + +import org.toxsoft.core.tsgui.m5.*; +import org.toxsoft.core.tsgui.m5.model.impl.*; +import org.toxsoft.core.tslib.coll.*; +import org.toxsoft.core.tslib.utils.errors.*; + +import com.hazard157.psx.proj3.todos.*; + +/** + * LM for {@link TodoM5Model}. + * + * @author hazard157 + */ +class TodoM5LifecycleManager + extends M5LifecycleManager { + + public TodoM5LifecycleManager( IM5Model aModel, IUnitTodos aMaster ) { + super( aModel, true, true, true, true, aMaster ); + } + + @Override + protected ITodo doCreate( IM5Bunch aValues ) { + String text = aValues.getAsAv( FID_TEXT ).asString(); + ITodo t = master().addTodo( text ); + String note = aValues.getAsAv( FID_NOTE ).asString(); + t.setTexts( text, note ); + t.setDone( aValues.getAsAv( FID_IS_DONE ).asBool() ); + t.setPriority( aValues.getAsAv( FID_PRIORITY ).asValobj() ); + for( ITodo todo : (IList)aValues.getAs( FID_RELATED_TODO_IDS, IList.class ) ) { + t.addRelatedTodo( todo.creationTime() ); + } + t.fulfilStages().setAll( aValues.getAs( FID_FULFIL_STAGES, IList.class ) ); + return t; + } + + @Override + protected ITodo doEdit( IM5Bunch aValues ) { + ITodo t = aValues.originalEntity(); + TsInternalErrorRtException.checkNull( t ); + String text = aValues.getAsAv( FID_TEXT ).asString(); + String note = aValues.getAsAv( FID_NOTE ).asString(); + t.setTexts( text, note ); + t.setDone( aValues.getAsAv( FID_IS_DONE ).asBool() ); + t.setPriority( aValues.getAsAv( FID_PRIORITY ).asValobj() ); + while( !t.relatedTodoIds().isEmpty() ) { + t.removeRelatedTodo( t.relatedTodoIds().get( 0 ).longValue() ); + } + for( ITodo todo : (IList)aValues.getAs( FID_RELATED_TODO_IDS, IList.class ) ) { + t.addRelatedTodo( todo.creationTime() ); + } + t.fulfilStages().setAll( aValues.getAs( FID_FULFIL_STAGES, IList.class ) ); + return t; + } + + @Override + protected void doRemove( ITodo aEntity ) { + master().removeTodo( aEntity.id() ); + } + + @Override + protected IList doListEntities() { + return master().todos().values(); + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5Model.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5Model.java new file mode 100644 index 0000000..0f8e90d --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5Model.java @@ -0,0 +1,214 @@ +package com.hazard157.prisex24.m5.todos; + +import static com.hazard157.prisex24.m5.IPsxM5Constants.*; +import static com.hazard157.prisex24.m5.todos.IPsxResources.*; +import static org.toxsoft.core.tsgui.m5.IM5Constants.*; +import static org.toxsoft.core.tslib.av.EAtomicType.*; +import static org.toxsoft.core.tslib.av.impl.AvUtils.*; +import static org.toxsoft.core.tslib.av.metainfo.IAvMetaConstants.*; + +import org.toxsoft.core.tsgui.m5.model.*; +import org.toxsoft.core.tsgui.m5.model.impl.*; +import org.toxsoft.core.tsgui.valed.api.*; +import org.toxsoft.core.tsgui.valed.controls.av.*; +import org.toxsoft.core.tsgui.valed.controls.basic.*; +import org.toxsoft.core.tslib.av.*; +import org.toxsoft.core.tslib.coll.*; +import org.toxsoft.core.tslib.coll.impl.*; + +import com.hazard157.psx.proj3.todos.*; + +/** + * {@link ITodo} M5 model. + * + * @author hazard157 + */ +public class TodoM5Model + extends M5Model { + + /** + * {@link ITodo#id()} + */ + public static final IM5AttributeFieldDef ID = new M5AttributeFieldDef<>( FID_ID, INTEGER, // + TSID_NAME, STR_TD_TODO_ID, // + TSID_DESCRIPTION, STR_TD_TODO_ID_D, // + M5_OPID_FLAGS, avInt( M5FF_READ_ONLY | M5FF_HIDDEN ) // + ) { + + protected IAtomicValue doGetFieldValue( ITodo aEntity ) { + return avInt( aEntity.id() ); + } + }; + + /** + * {@link ITodo#creationTime()} + */ + public static final IM5AttributeFieldDef CREATION_TIME = + new M5AttributeFieldDef<>( FID_CREATION_TIME, TIMESTAMP, // + TSID_NAME, STR_TD_CREATION_TIME, // + TSID_DESCRIPTION, STR_TD_CREATION_TIME_D, // + M5_OPID_FLAGS, avInt( M5FF_COLUMN | M5FF_READ_ONLY ) // + ) { + + protected IAtomicValue doGetFieldValue( ITodo aEntity ) { + return avTimestamp( aEntity.id() ); + } + + protected String doGetFieldValueName( ITodo aEntity ) { + Long time = Long.valueOf( aEntity.creationTime() ); + return String.format( "%tF %tT", time, time ); //$NON-NLS-1$ + } + + }; + + /** + * {@link ITodo#priority()} + */ + public static final IM5AttributeFieldDef PRIORITY = new M5AttributeFieldDef<>( FID_PRIORITY, VALOBJ ) { + + @Override + protected void doInit() { + setNameAndDescription( STR_TD_PRIORITY, STR_TD_PRIORITY_D ); + setFlags( M5FF_COLUMN ); + setDefaultValue( EPriority.NORMAL.atomicValue() ); + } + + protected IAtomicValue doGetFieldValue( ITodo aEntity ) { + return aEntity.priority().atomicValue(); + } + + }; + + /** + * {@link ITodo#text()} + */ + public static final IM5AttributeFieldDef TEXT = new M5AttributeFieldDef<>( FID_TEXT, STRING, // + TSID_NAME, STR_TD_TEXT, // + TSID_DESCRIPTION, STR_TD_TEXT_D, // + M5_OPID_FLAGS, avInt( M5FF_COLUMN ) // + ) { + + protected IAtomicValue doGetFieldValue( ITodo aEntity ) { + return avStr( aEntity.text() ); + } + }; + + /** + * {@link ITodo#note()} + */ + public static final IM5AttributeFieldDef NOTE = new M5AttributeFieldDef<>( FID_NOTE, STRING, // + TSID_NAME, STR_TD_NOTE, // + TSID_DESCRIPTION, STR_TD_NOTE_D, // + IValedControlConstants.OPID_EDITOR_FACTORY_NAME, ValedAvStringText.FACTORY_NAME, // + ValedStringText.OPDEF_IS_MULTI_LINE, AV_TRUE, // + IValedControlConstants.OPID_VERTICAL_SPAN, avInt( 5 ) // + ) { + + @Override + protected void doInit() { + addFlags( M5FF_DETAIL ); + } + + protected IAtomicValue doGetFieldValue( ITodo aEntity ) { + return avStr( aEntity.note() ); + } + }; + + /** + * {@link ITodo#isDone()} + */ + public static final IM5AttributeFieldDef IS_DONE = new M5AttributeFieldDef<>( FID_IS_DONE, BOOLEAN, // + TSID_NAME, STR_TD_IS_DONE, // + TSID_DESCRIPTION, STR_TD_IS_DONE_D, // + TSID_FORMAT_STRING, FMT_BOOL_CHECK_AV, // + M5_OPID_FLAGS, avInt( M5FF_COLUMN ) // + ) { + + protected IAtomicValue doGetFieldValue( ITodo aEntity ) { + return avBool( aEntity.isDone() ); + } + }; + + /** + * {@link ITodo#relatedTodoIds()} + */ + public static final IM5MultiLookupKeyFieldDef RELATED_TODO_IDS = + new M5MultiLookupKeyFieldDef<>( FID_RELATED_TODO_IDS, MID_TODO, FID_TODO_ID, Long.class ) { + + @Override + protected void doInit() { + setNameAndDescription( STR_TD_RELATED_TODOS, STR_TD_RELATED_TODOS_D ); + setFlags( M5FF_DETAIL ); + setLookupProvider( new IM5LookupProvider() { + + @Override + public String getName( ITodo aItem ) { + Long time = Long.valueOf( aItem.creationTime() ); + return String.format( "%tF %tT - %s", time, time, aItem.text() ); //$NON-NLS-1$ + } + + @Override + public IList listItems() { + IUnitTodos ut = tsContext().get( IUnitTodos.class ); + return ut.todos().values(); + } + } ); + } + + protected IList doGetFieldValue( ITodo aEntity ) { + IListEdit result = new ElemArrayList<>(); + IUnitTodos ut = tsContext().get( IUnitTodos.class ); + for( Long id : aEntity.relatedTodoIds() ) { + ITodo relTodo = ut.todos().findByKey( id ); + if( relTodo != null ) { + result.add( relTodo ); + } + } + return result; + } + + }; + + /** + * {@link ITodo#fulfilStages()} + */ + public static final M5MultiModownFieldDef FULFIL_STAGES = // + new M5MultiModownFieldDef<>( FID_FULFIL_STAGES, MID_FULFIL_STAGE ) { + + @Override + protected void doInit() { + setNameAndDescription( STR_TD_FULFIL_STAGES, STR_TD_FULFIL_STAGES_D ); + setFlags( M5FF_DETAIL ); + } + + protected IList doGetFieldValue( ITodo aEntity ) { + return aEntity.fulfilStages(); + } + + }; + + /** + * Constructor. + */ + public TodoM5Model() { + super( MID_TODO, ITodo.class ); + setNameAndDescription( STR_M5M_TODO, STR_M5M_TODO_D ); + addFieldDefs( ID, CREATION_TIME, PRIORITY, IS_DONE, TEXT, NOTE, RELATED_TODO_IDS, FULFIL_STAGES ); + setPanelCreator( new TodoM5ModelPanelCreator() ); + } + + @Override + protected IM5LifecycleManager doCreateDefaultLifecycleManager() { + IUnitTodos unitTodos = tsContext().get( IUnitTodos.class ); + if( unitTodos == null ) { + return null; + } + return new TodoM5LifecycleManager( this, unitTodos ); + } + + @Override + protected IM5LifecycleManager doCreateLifecycleManager( Object aMaster ) { + return new TodoM5LifecycleManager( this, IUnitTodos.class.cast( aMaster ) ); + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5ModelPanelCreator.java b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5ModelPanelCreator.java new file mode 100644 index 0000000..19d60cf --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/TodoM5ModelPanelCreator.java @@ -0,0 +1,229 @@ +package com.hazard157.prisex24.m5.todos; + +import static com.hazard157.prisex24.m5.IPsxM5Constants.*; +import static com.hazard157.prisex24.m5.todos.IPsxResources.*; +import static org.toxsoft.core.tsgui.bricks.actions.ITsStdActionDefs.*; +import static org.toxsoft.core.tsgui.m5.gui.mpc.IMultiPaneComponentConstants.*; +import static org.toxsoft.core.tsgui.valed.api.IValedControlConstants.*; +import static org.toxsoft.core.tslib.av.impl.AvUtils.*; + +import java.sql.*; + +import org.toxsoft.core.tsgui.bricks.actions.*; +import org.toxsoft.core.tsgui.bricks.ctx.*; +import org.toxsoft.core.tsgui.bricks.tsnodes.*; +import org.toxsoft.core.tsgui.bricks.tstree.tmm.*; +import org.toxsoft.core.tsgui.graphics.*; +import org.toxsoft.core.tsgui.graphics.icons.*; +import org.toxsoft.core.tsgui.m5.*; +import org.toxsoft.core.tsgui.m5.gui.mpc.impl.*; +import org.toxsoft.core.tsgui.m5.gui.panels.*; +import org.toxsoft.core.tsgui.m5.gui.panels.impl.*; +import org.toxsoft.core.tsgui.m5.model.*; +import org.toxsoft.core.tsgui.m5.model.impl.*; +import org.toxsoft.core.tsgui.panels.toolbar.*; +import org.toxsoft.core.tsgui.panels.vecboard.*; +import org.toxsoft.core.tsgui.panels.vecboard.impl.*; +import org.toxsoft.core.tsgui.utils.layout.*; +import org.toxsoft.core.tsgui.valed.api.*; +import org.toxsoft.core.tslib.bricks.filter.*; +import org.toxsoft.core.tslib.coll.*; +import org.toxsoft.core.tslib.coll.impl.*; +import org.toxsoft.core.tslib.utils.*; +import org.toxsoft.core.tslib.utils.errors.*; + +import com.hazard157.psx.proj3.todos.*; + +/** + * Panel creator for {@link ITodo}. + * + * @author hazard157 + */ +public class TodoM5ModelPanelCreator + extends M5DefaultPanelCreator { + + static final ITsNodeKind NK_DONE = new TsNodeKind<>( "Done", String.class, true ); //$NON-NLS-1$ + static final ITsNodeKind NK_PRIORITY = new TsNodeKind<>( "Priority", EPriority.class, true ); //$NON-NLS-1$ + static final ITsNodeKind NK_TODO = new TsNodeKind<>( "Todo", ITodo.class, false ); //$NON-NLS-1$ + + static class TreeMakerByDone + implements ITsTreeMaker { + + @Override + public IList makeRoots( ITsNode aRootNode, IList aItems ) { + DefaultTsNode nodeDone = new DefaultTsNode<>( NK_DONE, aRootNode, STR_NODE_DONE ); + DefaultTsNode nodeUndone = new DefaultTsNode<>( NK_DONE, aRootNode, STR_NODE_UNDONE ); + for( ITodo t : aItems ) { + DefaultTsNode parent; + if( t.isDone() ) { + parent = nodeDone; + } + else { + parent = nodeUndone; + } + DefaultTsNode n = new DefaultTsNode<>( NK_TODO, parent, t ); + parent.addNode( n ); + } + return new ElemArrayList<>( nodeDone, nodeUndone ); + } + + @Override + public boolean isItemNode( ITsNode aNode ) { + return aNode.kind() == NK_TODO; + } + + } + + static class TreeMakerByPriority + implements ITsTreeMaker { + + @SuppressWarnings( { "unchecked", "rawtypes" } ) + @Override + public IList makeRoots( ITsNode aRootNode, IList aItems ) { + IMapEdit> prNodes = new ElemMap<>(); + for( EPriority p : EPriority.values() ) { + prNodes.put( p, new DefaultTsNode<>( NK_PRIORITY, aRootNode, p ) ); + } + for( ITodo t : aItems ) { + DefaultTsNode parent = prNodes.getByKey( t.priority() ); + DefaultTsNode n = new DefaultTsNode<>( NK_TODO, parent, t ); + parent.addNode( n ); + } + return (IList)prNodes.values(); + } + + @Override + public boolean isItemNode( ITsNode aNode ) { + return aNode.kind() == NK_TODO; + } + + } + + /** + * Constructor. + */ + public TodoM5ModelPanelCreator() { + // nop + } + + @Override + protected IM5CollectionPanel doCreateCollEditPanel( ITsGuiContext aContext, + IM5ItemsProvider aItemsProvider, IM5LifecycleManager aLifecycleManager ) { + OPDEF_IS_ACTIONS_CRUD.setValue( aContext.params(), AV_TRUE ); + OPDEF_IS_FILTER_PANE.setValue( aContext.params(), AV_TRUE ); + OPDEF_IS_SUPPORTS_TREE.setValue( aContext.params(), AV_TRUE ); + OPDEF_DETAILS_PANE_PLACE.setValue( aContext.params(), avValobj( EBorderLayoutPlacement.EAST ) ); + TreeModeInfo tmi1 = new TreeModeInfo<>( "ByDone", //$NON-NLS-1$ + STR_TMM_BY_DONE, STR_TMM_BY_DONE_D, null, new TreeMakerByDone() ); + TreeModeInfo tmi2 = new TreeModeInfo<>( "ByPriority", //$NON-NLS-1$ + STR_TMM_BY_PRIORITY, STR_TMM_BY_PRIORITY_D, null, new TreeMakerByPriority() ); + MultiPaneComponentModown mpc = + new MultiPaneComponentModown<>( aContext, model(), aItemsProvider, aLifecycleManager ) { + + @Override + protected void doAdjustEntityCreationInitialValues( IM5BunchEdit aValues ) { + aValues.set( FID_CREATION_TIME, avTimestamp( new Timestamp( System.currentTimeMillis() ).getTime() ) ); + } + + @Override + protected ITsToolbar doCreateToolbar( ITsGuiContext aCtx, String aName, EIconSize aIconSize, + IListEdit aActs ) { + aActs.add( ACDEF_SEPARATOR ); + aActs.add( ACDEF_FILTER_CHECK ); + return super.doCreateToolbar( aCtx, aName, aIconSize, aActs ); + } + + @Override + protected void doProcessAction( String aActionId ) { + switch( aActionId ) { + case ACTID_FILTER: { + boolean onlyUndone = toolbar().isActionChecked( ACTID_FILTER ); + if( onlyUndone ) { + tree().filterManager().setFilter( aObj -> !aObj.isDone() ); + } + else { + tree().filterManager().setFilter( ITsFilter.ALL ); + } + break; + } + default: + throw new TsNotAllEnumsUsedRtException( aActionId ); + } + } + + }; + mpc.treeModeManager().addTreeMode( tmi1 ); + mpc.treeModeManager().addTreeMode( tmi2 ); + return new M5CollectionPanelMpcModownWrapper<>( mpc, false ); + } + + @Override + protected IM5MultiLookupPanel doCreateMultiLookupPanel( ITsGuiContext aContext, + IM5LookupProvider aLookupProvider ) { + OPDEF_IS_FILTER_PANE.setValue( aContext.params(), AV_TRUE ); + MultiPaneComponentLookup mpc = new MultiPaneComponentLookup<>( aContext, model(), aLookupProvider ); + return new M5MultiLookupPanelMpcLookupWrapper<>( mpc, false ); + } + + @Override + protected IM5EntityPanel doCreateEntityEditorPanel( ITsGuiContext aContext, + IM5LifecycleManager aLifecycleManager ) { + return new M5DefaultEntityEditorPanel<>( aContext, model(), aLifecycleManager ) { + + @Override + protected void doInitLayout() { + IVecTabLayout lTabs = new VecTabLayout( false ); + // Properties tab + IVecLadderLayout lProps = new VecLadderLayout( true ); + IVecBoard bProps = new VecBoard(); + bProps.setLayout( lProps ); + lTabs.addControl( bProps, new VecTabLayoutData( TAB_TODO_PROPS, TAB_TODO_PROPS_D ) ); + // related Todos tab + IVecBorderLayout lTodos = new VecBorderLayout(); + IVecBoard bTodos = new VecBoard(); + bTodos.setLayout( lTodos ); + lTabs.addControl( bTodos, new VecTabLayoutData( TAB_TODO_TODOS, TAB_TODO_TODOS_D ) ); + // Fulfill stages tab + IVecBorderLayout lStages = new VecBorderLayout(); + IVecBoard bStages = new VecBoard(); + bStages.setLayout( lStages ); + lTabs.addControl( bStages, new VecTabLayoutData( TAB_TODO_STAGES, TAB_TODO_STAGES_D ) ); + + for( String fieldId : editors().keys() ) { + IValedControl varEditor = editors().getByKey( fieldId ); + switch( fieldId ) { + case FID_RELATED_TODO_IDS: { + lTodos.addControl( varEditor, EBorderLayoutPlacement.CENTER ); + break; + } + case FID_FULFIL_STAGES: { + lStages.addControl( varEditor, EBorderLayoutPlacement.CENTER ); + break; + } + default: { + int verSpan = varEditor.params().getInt( OPDEF_VERTICAL_SPAN ); + boolean isPrefWidthFixed = varEditor.params().getBool( OPDEF_IS_WIDTH_FIXED ); + boolean isPrefHeighFixed = varEditor.params().getBool( OPDEF_IS_HEIGHT_FIXED ); + boolean useLabel = !varEditor.params().getBool( OPDEF_NO_FIELD_LABEL ); + EHorAlignment horAl = isPrefWidthFixed ? EHorAlignment.LEFT : EHorAlignment.FILL; + EVerAlignment verAl = isPrefHeighFixed ? EVerAlignment.TOP : EVerAlignment.FILL; + IM5FieldDef fd = model().fieldDefs().getByKey( fieldId ); + String label = TsLibUtils.EMPTY_STRING; + if( !fd.nmName().isEmpty() ) { + label = fd.nmName() + ": "; //$NON-NLS-1$ + } + IVecLadderLayoutData layoutData = + new VecLadderLayoutData( useLabel, false, verSpan, label, horAl, verAl ); + lProps.addControl( varEditor, layoutData ); + break; + } + } + } + board().setLayout( lTabs ); + return; + } + + }; + } + +} diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages.properties b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages.properties new file mode 100644 index 0000000..017066d --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages.properties @@ -0,0 +1,38 @@ +STR_FS_DESCRIPTION = Description +STR_FS_DESCRIPTION_D = Detailed description of the execution phase +STR_FS_NAME = Name +STR_FS_NAME_D = Task execution stage name +STR_FS_WHEN = When +STR_FS_WHEN_D = Date/time the stage was completed +STR_M5M_FULFIL_STAGE = Stage +STR_M5M_FULFIL_STAGE_D = Task execution stage +STR_M5M_TODO = Tasks +STR_M5M_TODO_D = Information about the planned case +STR_NODE_DONE = Fulfilled +STR_NODE_UNDONE = Not done +STR_TD_CREATION_TIME = Created +STR_TD_CREATION_TIME_D = Time of creation +STR_TD_FULFIL_STAGES = Stages +STR_TD_FULFIL_STAGES_D = Stages of the task +STR_TD_IS_DONE = Done? +STR_TD_IS_DONE_D = Sign of the completion (execution) of the task +STR_TD_NOTE = Notes +STR_TD_NOTE_D = Explanations for the task +STR_TD_PRIORITY = Priority +STR_TD_PRIORITY_D = Importance (priority) of the case +STR_TD_RELATED_TODOS = Linked +STR_TD_RELATED_TODOS_D = Related tasks +STR_TD_TEXT = Text +STR_TD_TEXT_D = Brief description of the task +STR_TD_TODO_ID = ID +STR_TD_TODO_ID_D = Identifier +STR_TMM_BY_DONE = Done? +STR_TMM_BY_DONE_D = Separation into groups of completed and not completed tasks +STR_TMM_BY_PRIORITY = Priority +STR_TMM_BY_PRIORITY_D = Grouping tasks by importance +TAB_TODO_PROPS = Properties +TAB_TODO_PROPS_D = Task Properties +TAB_TODO_STAGES = Stages +TAB_TODO_STAGES_D = Execution steps +TAB_TODO_TODOS = Related +TAB_TODO_TODOS_D = Related tasks diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages_ka_GE.properties b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages_ka_GE.properties new file mode 100644 index 0000000..a743c51 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages_ka_GE.properties @@ -0,0 +1,38 @@ +STR_FS_DESCRIPTION = აღწერა +STR_FS_DESCRIPTION_D = შესრულების ეტაპის დეტალური აღწერა +STR_FS_NAME = სახელი +STR_FS_NAME_D = შესრულების ეტაპის სახელი +STR_FS_WHEN = Როდის +STR_FS_WHEN_D = ეტაპის დასრულების თარიღი/დრო +STR_M5M_FULFIL_STAGE = ეტაპი +STR_M5M_FULFIL_STAGE_D = ამოცანის შესრულების ეტაპი +STR_M5M_TODO = ამოცანები +STR_M5M_TODO_D = ინფორმაცია დაგეგმილი საქმის შესახებ +STR_NODE_DONE = დასრულებული +STR_NODE_UNDONE = არ არის გაკეთებული +STR_TD_CREATION_TIME = შექმნილია +STR_TD_CREATION_TIME_D = შექმნის დრო +STR_TD_FULFIL_STAGES = ეტაპები +STR_TD_FULFIL_STAGES_D = საქმის ეტაპები +STR_TD_IS_DONE = გაკეთდა? +STR_TD_IS_DONE_D = საქმის დასრულების (აღსრულების) ნიშანი +STR_TD_NOTE = შენიშვნები +STR_TD_NOTE_D = საქმის ახსნა +STR_TD_PRIORITY = პრიორიტეტი +STR_TD_PRIORITY_D = საქმის მნიშვნელობა (პრიორიტეტი). +STR_TD_RELATED_TODOS = მიბმული +STR_TD_RELATED_TODOS_D = დაკავშირებული საქმეები +STR_TD_TEXT = ტექსტი +STR_TD_TEXT_D = ამოცანის მოკლე აღწერა +STR_TD_TODO_ID = ID +STR_TD_TODO_ID_D = იდენტიფიკატორი +STR_TMM_BY_DONE = გაკეთდა? +STR_TMM_BY_DONE_D = შესრულებული და დაუსრულებელი დავალებების ჯგუფებად დაყოფა +STR_TMM_BY_PRIORITY = პრიორიტეტი. +STR_TMM_BY_PRIORITY_D = ამოცანების დაჯგუფება მნიშვნელობის მიხედვით +TAB_TODO_PROPS = თვისებები +TAB_TODO_PROPS_D = ამოცანის თვისებები +TAB_TODO_STAGES = ეტაპები +TAB_TODO_STAGES_D = შესრულების ნაბიჯები +TAB_TODO_TODOS = ბმული +TAB_TODO_TODOS_D = დაკავშირებული ამოცანები diff --git a/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages_ru_RU.properties b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages_ru_RU.properties new file mode 100644 index 0000000..655f451 --- /dev/null +++ b/com.hazard157.prisex24/src/com/hazard157/prisex24/m5/todos/messages_ru_RU.properties @@ -0,0 +1,38 @@ +STR_FS_DESCRIPTION = Описание +STR_FS_DESCRIPTION_D = Подробное описание этапа +STR_FS_NAME = Название +STR_FS_NAME_D = Название этапа выполнения задачи +STR_FS_WHEN = Когда +STR_FS_WHEN_D = Дата/время выполнения этапа +STR_M5M_FULFIL_STAGE = Этап +STR_M5M_FULFIL_STAGE_D = Этап выполнения задачи +STR_M5M_TODO = Дела +STR_M5M_TODO_D = Информация о запланированном деле +STR_NODE_DONE = Выполненные +STR_NODE_UNDONE = Не сделанные +STR_TD_CREATION_TIME = Создано +STR_TD_CREATION_TIME_D = Время создания +STR_TD_FULFIL_STAGES = Этапы +STR_TD_FULFIL_STAGES_D = Этапы выполнения дела +STR_TD_IS_DONE = Сделано? +STR_TD_IS_DONE_D = Признак завершения (исполнения) дела +STR_TD_NOTE = Заметки +STR_TD_NOTE_D = Пояснения к делу +STR_TD_PRIORITY = Важность +STR_TD_PRIORITY_D = Важность (приоритет) дела +STR_TD_RELATED_TODOS = Связано +STR_TD_RELATED_TODOS_D = Связанные с этим делом другие дела +STR_TD_TEXT = Текст +STR_TD_TEXT_D = Краткое описание дела +STR_TD_TODO_ID = ИД +STR_TD_TODO_ID_D = Идентификатор +STR_TMM_BY_DONE = Сделано? +STR_TMM_BY_DONE_D = Разделение по группам выпоненных и несдаллын задач +STR_TMM_BY_PRIORITY = Важность +STR_TMM_BY_PRIORITY_D = Группировка дел по важности +TAB_TODO_PROPS = Свойства +TAB_TODO_PROPS_D = Свойства задачи +TAB_TODO_STAGES = Этапы +TAB_TODO_STAGES_D = Этапы выполнения +TAB_TODO_TODOS = Связано +TAB_TODO_TODOS_D = Связанные задачи diff --git a/com.hazard157.psx.proj3/src/com/hazard157/psx/proj3/todos/EPriority.java b/com.hazard157.psx.proj3/src/com/hazard157/psx/proj3/todos/EPriority.java index 9ab0a25..822e5f1 100644 --- a/com.hazard157.psx.proj3/src/com/hazard157/psx/proj3/todos/EPriority.java +++ b/com.hazard157.psx.proj3/src/com/hazard157/psx/proj3/todos/EPriority.java @@ -1,7 +1,9 @@ package com.hazard157.psx.proj3.todos; import static com.hazard157.psx.proj3.todos.IPsxResources.*; +import static org.toxsoft.core.tslib.av.impl.AvUtils.*; +import org.toxsoft.core.tslib.av.*; import org.toxsoft.core.tslib.bricks.keeper.*; import org.toxsoft.core.tslib.bricks.keeper.std.*; import org.toxsoft.core.tslib.bricks.strid.*; @@ -47,6 +49,8 @@ public enum EPriority */ public static final IEntityKeeper KEEPER = new StridableEnumKeeper<>( EPriority.class ); + private IAtomicValue av = null; + private static IList itemsList = null; private final String id; private final String description; @@ -66,7 +70,7 @@ public enum EPriority } // -------------------------------------------------------------------------- - // Реализация интерфейса IStridable + // IStridable // @Override @@ -88,6 +92,18 @@ public String description() { // API // + /** + * Returns the {@link EAtomicType#VALOBJ} atomic value of this constant. + * + * @return {@link IAtomicValue} - atomic value of this constant + */ + public IAtomicValue atomicValue() { + if( av == null ) { + av = avValobj( this ); + } + return av; + } + /** * Возвращает все константы перечисления в виде списка {@link IList}. * diff --git a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/IPsxM5Constants.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/IPsxM5Constants.java index 3e9db46..9e1efdf 100644 --- a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/IPsxM5Constants.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/IPsxM5Constants.java @@ -10,7 +10,7 @@ import org.toxsoft.core.tslib.av.opset.impl.*; /** - * Константы M5-моделирования сущностей PSX. + * PRISEX M5-modeling constants. * * @author hazard157 */ diff --git a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/FulfilStageM5Model.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/FulfilStageM5Model.java index d8a303a..5b96669 100644 --- a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/FulfilStageM5Model.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/FulfilStageM5Model.java @@ -1,7 +1,7 @@ package com.hazard157.psx24.core.m5.todos; -import static com.hazard157.psx.proj3.todos.ITodoM5Constants.*; import static com.hazard157.psx24.core.m5.todos.IPsxResources.*; +import static com.hazard157.psx24.core.m5.todos.ITodoM5Constants.*; import static org.toxsoft.core.tsgui.m5.IM5Constants.*; import static org.toxsoft.core.tsgui.m5.gui.mpc.IMultiPaneComponentConstants.*; import static org.toxsoft.core.tsgui.valed.api.IValedControlConstants.*; diff --git a/com.hazard157.psx.proj3/src/com/hazard157/psx/proj3/todos/ITodoM5Constants.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/ITodoM5Constants.java similarity index 92% rename from com.hazard157.psx.proj3/src/com/hazard157/psx/proj3/todos/ITodoM5Constants.java rename to com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/ITodoM5Constants.java index 91986de..25a24f7 100644 --- a/com.hazard157.psx.proj3/src/com/hazard157/psx/proj3/todos/ITodoM5Constants.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/ITodoM5Constants.java @@ -1,4 +1,6 @@ -package com.hazard157.psx.proj3.todos; +package com.hazard157.psx24.core.m5.todos; + +import com.hazard157.psx.proj3.todos.*; /** * Константы M3-моделирования {@link IUnitTodos}. @@ -16,11 +18,11 @@ public interface ITodoM5Constants { String MID_PRIORITY = TODO_M3ID_PREFIX + "Priority"; String FID_TODO_ID = "TodoId"; // long, not String + String FID_RELATED_TODO_IDS = "RelatedTodoIds"; String FID_CREATION_TIME = "CreationTime"; String FID_TEXT = "Text"; String FID_IS_DONE = "IsDone"; String FID_PRIORITY = "Priority"; - String FID_RELATED_TODO_IDS = "RelatedTodoIds"; String FID_REMINDER = "Reminder"; String FID_FULFIL_STAGES = "FulfilStages"; String FID_IS_ACTIVE = "IsActive"; diff --git a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/PriorityM5Model.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/PriorityM5Model.java index df67106..7c424e6 100644 --- a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/PriorityM5Model.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/PriorityM5Model.java @@ -1,7 +1,7 @@ package com.hazard157.psx24.core.m5.todos; -import static com.hazard157.psx.proj3.todos.ITodoM5Constants.*; import static com.hazard157.psx24.core.m5.todos.IPsxResources.*; +import static com.hazard157.psx24.core.m5.todos.ITodoM5Constants.*; import org.toxsoft.core.tsgui.m5.std.models.enums.*; diff --git a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/ReminderM5Model.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/ReminderM5Model.java index 1dbb005..d625b98 100644 --- a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/ReminderM5Model.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/ReminderM5Model.java @@ -1,7 +1,7 @@ package com.hazard157.psx24.core.m5.todos; -import static com.hazard157.psx.proj3.todos.ITodoM5Constants.*; import static com.hazard157.psx24.core.m5.todos.IPsxResources.*; +import static com.hazard157.psx24.core.m5.todos.ITodoM5Constants.*; import static org.toxsoft.core.tslib.av.EAtomicType.*; import static org.toxsoft.core.tslib.av.impl.AvUtils.*; import static org.toxsoft.core.tslib.av.metainfo.IAvMetaConstants.*; diff --git a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5LifecycleManager.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5LifecycleManager.java index f11a179..dbbc74d 100644 --- a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5LifecycleManager.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5LifecycleManager.java @@ -1,7 +1,7 @@ package com.hazard157.psx24.core.m5.todos; import static com.hazard157.lib.core.IHzLibConstants.*; -import static com.hazard157.psx.proj3.todos.ITodoM5Constants.*; +import static com.hazard157.psx24.core.m5.todos.ITodoM5Constants.*; import org.toxsoft.core.tsgui.m5.*; import org.toxsoft.core.tsgui.m5.model.impl.*; diff --git a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5Model.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5Model.java index c3ccd54..d0202fb 100644 --- a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5Model.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5Model.java @@ -1,8 +1,8 @@ package com.hazard157.psx24.core.m5.todos; import static com.hazard157.lib.core.IHzLibConstants.*; -import static com.hazard157.psx.proj3.todos.ITodoM5Constants.*; import static com.hazard157.psx24.core.m5.todos.IPsxResources.*; +import static com.hazard157.psx24.core.m5.todos.ITodoM5Constants.*; import static org.toxsoft.core.tsgui.m5.IM5Constants.*; import static org.toxsoft.core.tsgui.m5.valeds.IM5ValedConstants.*; import static org.toxsoft.core.tslib.av.EAtomicType.*; diff --git a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5ModelPanelCreator.java b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5ModelPanelCreator.java index 13adc1f..befbf52 100644 --- a/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5ModelPanelCreator.java +++ b/com.hazard157.psx24.core/src/com/hazard157/psx24/core/m5/todos/TodoM5ModelPanelCreator.java @@ -1,7 +1,7 @@ package com.hazard157.psx24.core.m5.todos; -import static com.hazard157.psx.proj3.todos.ITodoM5Constants.*; import static com.hazard157.psx24.core.m5.todos.IPsxResources.*; +import static com.hazard157.psx24.core.m5.todos.ITodoM5Constants.*; import static org.toxsoft.core.tsgui.bricks.actions.ITsStdActionDefs.*; import static org.toxsoft.core.tsgui.m5.gui.mpc.IMultiPaneComponentConstants.*; import static org.toxsoft.core.tsgui.valed.api.IValedControlConstants.*; diff --git a/com.hazard157.psx24.exe/bin/.gitignore b/com.hazard157.psx24.exe/bin/.gitignore new file mode 100644 index 0000000..c2d9872 --- /dev/null +++ b/com.hazard157.psx24.exe/bin/.gitignore @@ -0,0 +1 @@ +/com/ diff --git a/com.hazard157.psx24.exe/src/com/hazard157/psx24/exe/Activator.java b/com.hazard157.psx24.exe/src/com/hazard157/psx24/exe/Activator.java index e7b8883..e20075b 100644 --- a/com.hazard157.psx24.exe/src/com/hazard157/psx24/exe/Activator.java +++ b/com.hazard157.psx24.exe/src/com/hazard157/psx24/exe/Activator.java @@ -52,7 +52,7 @@ public Activator() { protected void doStart() { IMwsOsgiService mws = findOsgiService( IMwsOsgiService.class ); mws.setAppInfo( APP_INFO ); - // конфигурация плагина проекта + // configure TsProject plugin IUnitTxtprojMwsConstants.OPDEF_SHOW_CMD_IN_TOOLBAR.setValue( mws.context().params(), AV_TRUE ); IUnitTxtprojMwsConstants.OPDEF_SHOW_CMD_IN_MENU.setValue( mws.context().params(), AV_TRUE ); IUnitTxtprojMwsConstants.OPDEF_ALWAYS_USE_FILE_MENU.setValue( mws.context().params(), AV_TRUE );