New class between old class and its subclasses in Protege - protege

Supposing I have an OWL class class_1 with subclasses: sub_1, sub_2, sub_3, how do I turn sub_1, sub_2, sub_3 into subclasses of a new class named new_class, and make new_class to be subclass of class_1 ? I am googling it, without any success...

You can add new_class as a subclass of class_1 by selecting class_1 and clicking on the add class button. You can then select the other classes you wish to modify and add new_class as a superclass (the options are available in the detail pane). There's no need to remove the previous subclass relationships as they are still true in the new setup.

Related

How to override a class in liferay 7/DXP. the class inside the modules/ foundation?

Is there any way to override class inside the modules/foundation in liferay DXP?
Liferay 7 design is more over extensible than override. Instead of overriding something extend the functionality or replace with another module.
Here's are few samples which allow us to extend at different level.
https://github.com/liferay/liferay-blade-samples/tree/master/liferay-workspace/extensions
https://github.com/liferay/liferay-blade-samples/tree/master/liferay-workspace/overrides

Visual C++: why watch view for derived class is not showing fields of base class?

I have split some class MyClass to 2 classes
MyClassBase and MyClassDerived
for example see the attached images:
MyClassDerived
I am seeing only the members MyClassDerived, no details on other base class members
http://i46.tinypic.com/14ljwxs.jpg
I need to expand to see more members of the class
MyClass
I see much more members of the class without expanding
http://i45.tinypic.com/mwfbzt.jpg
why doesnt the watch shows more members, is there any option to cause the watch to show more members??

staruml abstract classes?

does anyone know how to create an abstract class using StarUML? I couldnt find any mention in the documentation.
Is there some sort of more general concept which mirrors an abstract class?
select class from toolBox and add it to canvas, then go to properties select isAbstract checkbox.
then class name appears italic.
Migrated from comment
This tutorial creates an abstract class.
http://cnx.org/content/m15092/latest
View menu > select Editors > select class name and/or method in class diagram > Poperty window > select isAbstract > you'll see your class name and/or method in italics

WPF UserControl inherited from custom UserControl class not working

i am creating a UserControl in WPF but it is not directly inherited from UserControl class. My base class is something as shown below
public class MyUserControlBase: UserControl, IMyInterface1, IMyInterface2
{..}
Now in my Usercontrol project, i have changed the usercontrol class signature
FROM
public partial class MyUserControl: UserControl //This is by default when the project was created.
TO
public partial class MyUserControl: MyUserControlBase
But it is giving error "Partial declarations of 'UI.MyUserControl' must not specify different base classes".
Please suggest what i have to change to make it run.
You also have to change where this control inherits from in the XAML part of your class. Still inheritance in WPF is a bit tricky, see this tutorial on how to get it right: http://svetoslavsavov.blogspot.com/2009/09/user-control-inheritance-in-wpf.html

capture delete key in CListCtrl and do soem processing

I have a class which inherits from CListCtrl class, say class list.
I have another class dlg, which inherits from CDialog.
Class dlg contains an instance of class list.
I have got a delete button in class dlg, on which I delete the selected item in listCtrl and do lots of other processing.
I want the same functionality on delete key.
I added OnKeyDown() fn is my class list, where I can capture VK_DELETE key. But my problem is that, how do I do otehr processing that I need to do in dialog class.
All that processing is dlg class based not list class based.
I have many such dlg classes with different data and in every dlg class processing is different.
I tried capturing VK_DELETE in dialog class, but it doesn't capture it if focus is on list class.
I am totally stuck and have no idea, how to do this.
Please give me some idea how i can do this.
Thanks,
SG
What about delegating the call captured in the List class to the parent Dialog class. Thus you capture the VK_DELETE on the List class and say to the parent that you received a Delete command. Thus you can keep all your processing on the parent Dialog class if you wish.
((CMyParentDialog*) GetParent())->OnDeleteKeyPressed(this);
Or better, create a custom message and post it to the parent window.
#define W_DELETE_PRESSED_ON_LIST (WM_USER + 1)
GetParent()->PostMessage(WM_DELETE_PRESSED_ON_LIST);

Resources