How to override local plugin function in theme core_renderer in Moodle - plugins

I want to override local plugin's function in my own theme h5pmod's core_renderer.
How can I override it?
Can I extends local plugin class in theme?
class core_renderer extends ltool\note\ltool_email_popoutform{
[I try as above but I gating this errors][1]
I try as above

Related

Resource Change Plugin for eclipse

I created an RCP application which detects resource change in its own view by extending CommonNavigator.
public abstract class NavigatorView extends CommonNavigator implements
IResourceChangeListener {
public void createPartControl(Composite parent) {
super.createPartControl(parent);
hookResourceChangeCommand(); // my resource tracking function.
}
}
But now I need to create a plugin for this which detects resource change in project explorer in eclipse itself. I cannot create a view now and I need to detect already existing view. How should I do it ?
Please completely remove the view that you created. You should not do anything in the UI, if you want to track resource changes, as resources are part of the workspace concept, and the workspace is generally headless (that is without UI).
Instead use the code below (taken from the resource change listener tutorial):
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IResourceChangeListener listener = new IResourceChangeListener() {
public void resourceChanged(IResourceChangeEvent event) {
System.out.println("Something changed!");
}
};
workspace.addResourceChangeListener(listener);
//... some time later one ...
workspace.removeResourceChangeListener(listener);

How to get data from Application class to PhoneStateListener class?

I have an Android app that has an Application class and I have another class that extends PhoneStateListener.
I would like to use one of the objects from the Application class in my class that extends the PhoneStateListener. I wasn't able to do so because it the PhoneStateListener class doesn't extend Activity.
Is there any way I can use the object from the Application class within my PhoneStateListener class?
See this example and this Question
Extend PhoneStateListener and have a constructor that takes what it wants as argument.

How can I create wizards in spring rcp using netbeans?

I created forms by extending AbstractForm class,now I want to create wizards but I am facing problem in it,can you help me creating wizards in spring-rcp using netbeans from start
1.create more than one form(refer http://netbeans.dzone.com/news/getting-further-with-spring-rc)
2.after that create child class of AbstractWizard.Initialize your forms on class load and then use method addForm(Object);
like addForm(form1); addForm(form2);
3.In your view class override createControl method,create object of your wizard class and then
call showDialog method.
Your wizards starts.

Why we use extends application

MainActivity extends Application {
...
}
What is the use of writing extends Application?
Extends means that it inherits from Application, therefore having all of the Application properties, methods, and so forth, but extends it with your specific functionality. In other words, MainActivity adds more to the base Application.

How to get a Listener in Eclipse FormPage

I am adding 3 pages inside an editor through Eclipse's FormPage. Now on selecting each page I want a listener to get fired. I tried to implement IPageListener in each page class, but none of them responded me. How to get the listener while selecting any page in eclipse FormPage?
I have made a FormEditor class,
public class SimpleFormEditor extends FormEditor
Then I added addPage inside it,
addPage(new ApplicationFormPage(this));
Now in this ApplicationFormPage, I implemented IPageListener,
public class ApplicationFormPage extends FormPage implements IPageListener{
Actually my plan is to get the listener as soon as we click on this page tab.
When your form page is instantiated, you need to add it to something in order to get notified of page changes. In MultiPageEditorPart they use org.eclipse.jface.dialogs.IPageChangedListener.
formEditor.addPageChangedListener(page);