[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] How to Extending PDT 2.2??

hi,

did you do this:

Register this class in plugin.xml:

 <extension point="org.eclipse.php.core.languageModelProviders">
<provider class="co.kr.mk.framework.MKFramework" />
</extension>


2010/11/10 êíì <hjkim@xxxxxxxxxxxxxx>

Â

Hi all. Iâm new in PDT.

Â

Iâm trying to extending PDT 2.2 with languageModelProvidersâs extension point.

But, Iâm not good at JAVA&Eclipse. :(

Â

Iâve read a API Doc already.. but itâs not help me;;

A Doc link is http://wiki.eclipse.org/Extending_PDT_2.2#Language_library_contributions

Â

Here is a my extending source..

Please, check my source.

Â

It is a successfully exported and installed. But itâs not working.

Â

package co.kr.mk.framework;

Â

import org.eclipse.core.runtime.IPath;

import org.eclipse.core.runtime.Path;

import org.eclipse.core.runtime.Plugin;

import org.eclipse.dltk.core.IScriptProject;

import org.eclipse.php.core.language.ILanguageModelProvider;

Â

public class MKFramework extends Plugin implements ILanguageModelProvider {

ÂÂÂÂÂ

ÂÂÂÂÂ private static MKFramework plugin;

ÂÂÂÂÂ

ÂÂÂÂÂ public MKFramework() {

ÂÂÂÂÂ }

ÂÂÂÂÂ

ÂÂÂÂÂ public static MKFramework getDefault() {

ÂÂÂÂÂÂÂÂÂÂÂ if( plugin == null ) {

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ plugin = new MKFramework();

ÂÂÂÂÂÂÂÂÂÂÂ }

ÂÂÂÂÂÂÂÂÂÂÂ return plugin;

ÂÂÂÂÂ }

Â

ÂÂÂÂÂ public IPath getPath(IScriptProject project) {

ÂÂÂÂÂÂÂÂÂÂÂ // TODO Auto-generated method stub

ÂÂÂÂÂÂÂÂÂÂÂ return new Path("resources/mk");

ÂÂÂÂÂ }

Â

ÂÂÂÂÂ public String getName() {

ÂÂÂÂÂÂÂÂÂÂÂ // TODO Auto-generated method stub

ÂÂÂÂÂÂÂÂÂÂÂ return null;

ÂÂÂÂÂ }

Â

ÂÂÂÂÂ public Plugin getPlugin() {

ÂÂÂÂÂÂÂÂÂÂÂ // TODO Auto-generated method stub

ÂÂÂÂÂÂÂÂÂÂÂ return MKFramework.getDefault();

ÂÂÂÂÂ }

ÂÂÂÂÂ

Â

}

Â

And..

A custom php file sttub in resources/mk is..

Â

<?php

Â

/**

Â*

Â* Test function

Â* @param string $ppp

Â*/

function hjkim($ppp) {

ÂÂÂÂÂ return $ppp;

}

Â

Â

How to make a code assistance for custom PHP Library Function and Class?

Â

Thanks all.

Â

Â

----------------------------------------------------------------------------------------------------------------------------------------------------------

(ì) ëêëì ììí êëë êíì ëë | hjkim@mkinternet.com | @powfly | 02*2000*5443 | 010*6332*9272

Â


_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev




--

Thanks!

Best Regards!

Zhao