Skip to content

Commit

Permalink
Prisex 24.2: todos done
Browse files Browse the repository at this point in the history
  • Loading branch information
goga authored and goga committed Jun 14, 2023
1 parent ba550c0 commit 1e14859
Show file tree
Hide file tree
Showing 57 changed files with 1,048 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion com.hazard157.prisex24/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions com.hazard157.prisex24/OSGI-INF/l10n/bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions com.hazard157.prisex24/OSGI-INF/l10n/bundle_ka_GE.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ინტერვალების კადრები
2 changes: 2 additions & 0 deletions com.hazard157.prisex24/OSGI-INF/l10n/bundle_ru_RU.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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 = Кадры интервалов
24 changes: 21 additions & 3 deletions com.hazard157.prisex24/fragment.e4xmi
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
<?xml version="1.0" encoding="ASCII"?>
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:commands="http://www.eclipse.org/ui/2010/UIModel/application/commands" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_cglrMAilEe6RgN0UorbIgw">
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:commands="http://www.eclipse.org/ui/2010/UIModel/application/commands" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_cglrMAilEe6RgN0UorbIgw">
<imports xsi:type="commands:Category" xmi:id="_dXCyEAilEe6RgN0UorbIgw" elementId="org.toxsoft.mws.cmdcategory.global"/>
<imports xsi:type="commands:Command" xmi:id="_erzlkAilEe6RgN0UorbIgw" elementId="org.toxsoft.mws.cmd.switch_persp">
<parameters xmi:id="_f5JicAilEe6RgN0UorbIgw" elementId="org.toxsoft.mws.cmd.switch_persp.arg.perspId" name="org.toxsoft.mws.cmd.switch_persp.arg.perspId"/>
</imports>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_jTIWAAilEe6RgN0UorbIgw" featurename="addons" parentElementId="org.toxsoft.mws.app.main">
<elements xsi:type="application:Addon" xmi:id="_lW7SYAioEe6RgN0UorbIgw" elementId="com.hazard157.prisex24.addon.0" contributionURI="bundleclass://com.hazard157.prisex24/com.hazard157.prisex24.e4.addons.Addon00Prisex24Core"/>
<elements xsi:type="application:Addon" xmi:id="_mmvUcAioEe6RgN0UorbIgw" elementId="com.hazard157.prisex24.addon.1" contributionURI="bundleclass://com.hazard157.prisex24/com.hazard157.prisex24.e4.addons.Addon05Prisex24WindowsSize"/>
<elements xsi:type="application:Addon" xmi:id="_lW7SYAioEe6RgN0UorbIgw" elementId="com.hazard157.prisex24.addon.0" contributionURI="bundleclass://com.hazard157.prisex24/com.hazard157.prisex24.e4.addons.AddonPrisex24Core"/>
<elements xsi:type="application:Addon" xmi:id="_mmvUcAioEe6RgN0UorbIgw" elementId="com.hazard157.prisex24.addon.1" contributionURI="bundleclass://com.hazard157.common/com.hazard157.common.e4.addons.AddonMainWindowDebugSize"/>
<elements xsi:type="application:Addon" xmi:id="_fG-BkAqoEe6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.addon.2" contributionURI="bundleclass://com.hazard157.common/com.hazard157.common.e4.addons.AddonInitialPerspectiveChooser"/>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_19JvIAqoEe6kmvIYOJ1hbQ" featurename="children" parentElementId="org.toxsoft.mws.perspectivestack.main">
<elements xsi:type="advanced:Perspective" xmi:id="_3hJRcAqoEe6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.persp.refbooks" label="%Persp_Refbooks" iconURI="platform:/plugin/com.hazard157.common/icons/is24x24/refbooks-list.png" tooltip="%Persp_Refbooks_D">
<children xsi:type="basic:PartStack" xmi:id="_R3000AqqEe6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.partstack.refbooks">
<children xsi:type="basic:Part" xmi:id="_cc6_sAq0Ee6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.part.uipart_refbook_todos" contributionURI="bundleclass://com.hazard157.prisex24/com.hazard157.prisex24.e4.uiparts.UipartRefbookTodos" label="%Uipart_Refbook_Todos" iconURI="platform:/plugin/com.hazard157.prisex24/icons/is24x24/todos-list.png" tooltip="%Uipart_Refbook_Todos_D"/>
</children>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_ZtJLQAqqEe6kmvIYOJ1hbQ" featurename="children" parentElementId="org.toxsoft.mws.menu.main.perspectives">
<elements xsi:type="menu:HandledMenuItem" xmi:id="_eOsD0AqqEe6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.handledmenuitem.persp_refbooks" label="%Persp_Refbooks" iconURI="platform:/plugin/com.hazard157.common/icons/is24x24/refbooks-list.png" tooltip="%Persp_Refbooks_D" type="Radio" command="_erzlkAilEe6RgN0UorbIgw">
<parameters xmi:id="_jiNy8AqqEe6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.parameter.0" name="org.toxsoft.mws.cmd.switch_persp.arg.perspId" value="com.hazard157.prisex24.persp.refbooks"/>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_Z5OfcAqqEe6kmvIYOJ1hbQ" featurename="children" parentElementId="org.toxsoft.mws.toolbar.perspectives">
<elements xsi:type="menu:HandledToolItem" xmi:id="_e7h7sAqqEe6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.handledtoolitem.persp_refbooks" label="%Persp_Refbooks" iconURI="platform:/plugin/com.hazard157.common/icons/is24x24/refbooks-list.png" tooltip="%Persp_Refbooks_D" type="Radio" command="_erzlkAilEe6RgN0UorbIgw">
<parameters xmi:id="_kUtm4AqqEe6kmvIYOJ1hbQ" elementId="com.hazard157.prisex24.parameter.1" name="org.toxsoft.mws.cmd.switch_persp.arg.perspId" value="com.hazard157.prisex24.persp.refbooks"/>
</elements>
</fragments>
</fragment:ModelFragments>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.hazard157.prisex24/icons/is16x16/todo-item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.hazard157.prisex24/icons/is16x16/todos-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.hazard157.prisex24/icons/todo-item-dimmed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.hazard157.prisex24/icons/todo-item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added com.hazard157.prisex24/icons/todos-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
42 changes: 42 additions & 0 deletions com.hazard157.prisex24/src/com/hazard157/prisex24/Activator.java
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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;

/**
Expand All @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,29 @@
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.*;
import org.toxsoft.core.tslib.utils.*;

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 );
}

Expand All @@ -41,6 +44,7 @@ public Addon00Prisex24Core() {
@Override
protected void doRegisterQuants( IQuantRegistrator aQuantRegistrator ) {
aQuantRegistrator.registerQuant( new QuantTsGuiRcp() );
aQuantRegistrator.registerQuant( new QuantPsx3Project() );
}

@Override
Expand All @@ -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$
Expand Down
Original file line number Diff line number Diff line change
@@ -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<ITodo> todoModel = m5().getModel( IPsxM5Constants.MID_TODO, ITodo.class );
ITsGuiContext ctx = new TsGuiContext( tsContext() );
IM5LifecycleManager<ITodo> lm = todoModel.getLifecycleManager( unitTodos );
IM5CollectionPanel<ITodo> todoPanel = todoModel.panelCreator().createCollEditPanel( ctx, lm.itemsProvider(), lm );
todoPanel.createControl( aParent );
}

}
Original file line number Diff line number Diff line change
@@ -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$

}
Loading

0 comments on commit 1e14859

Please sign in to comment.