Seite 18 von 19

Verfasst: 20.02.2007 22:16
von Leonhard
Ich bin gerade dabei, ein PlugIn für jaPBe zu schreiben. Dabei soll bei jedem Compilieren / EXE-Erstellen mein PlugIn mit 2 Parametern gestartet werden: 1. der Name der Input-Datei (Source-Datei) und 2. der Name + der Output-Datei (die Datei, die geparst wird). Dabei soll die Orginal-Datei nicht verwendet werden.

In der PureBasic ID hab ich da folgendes gemacht:
Argumente: "%TEMPFILE" "D:\developing\PureBasic\IDE & Compiler\Compilers\PB_EditorOutput.pb"

(X) Warte bis Werkzeug beendet
Wie kann ich das in der jaPBe IDE umsetzen?

Verfasst: 21.02.2007 12:54
von gnozal
Leonhard hat geschrieben:Ich bin gerade dabei, ein PlugIn für jaPBe zu schreiben. Dabei soll bei jedem Compilieren / EXE-Erstellen mein PlugIn mit 2 Parametern gestartet werden: 1. der Name der Input-Datei (Source-Datei) und 2. der Name + der Output-Datei (die Datei, die geparst wird). Dabei soll die Orginal-Datei nicht verwendet werden.

In der PureBasic ID hab ich da folgendes gemacht:
Argumente: "%TEMPFILE" "D:\developing\PureBasic\IDE & Compiler\Compilers\PB_EditorOutput.pb"

(X) Warte bis Werkzeug beendet
Wie kann ich das in der jaPBe IDE umsetzen?
You cannot use it with arguments as a plugin, but as tool (plugins don't take arguments, but rely on the plugin interface).

Did you try this ?

Arguments : "%FILE" "%TEMPFILE"

Wait until tool Quits : (X)

Trigger : Before Create EXE
jaPBe manual hat geschrieben:Arguments
These are the command line parameters for your program. jaPBe supports the following placeholders:
%PATH
The path of the current file.
%FILE
The file name inclusive the path of the current file.
%TEMPFILE
The path and name of the file that jaPBe creates as a copy. Very handy if you want, that nothing will be changed on the original.
%CURSOR
This will be replaced by the current cursor position, in the form of LINExCOLUMN.
%WORD
Contains the word currently under the cursor.
%JAPBE
This will be replaced by the jaPBe main window handle.
%SCI
This will be replaced by the Scintilla window handle.

Trigger (only available for Plugins, or for Tools if 'Wait until tools Quit' is checked)
You can select when the tool or plugin should be executed. Any number of tools or plugins can have the same trigger, they will all be executed when the trigger event happens. The order of their execution depends on the order they appear in the list.
jaPBe Start : the tool will be executed right after jaPBe has been fully started.
jaPBe End : the tool will be executed right before jaPBe ends. Note that all open sources have already been closed at this time.
Before Compile/Run : the tool will be executed right before the compiler is called to compile a source code with F5/F6.
After Compile/Run : the tool will be executed right after the compilation is finished, but before the executable is executed for testing.
Before Create EXE : the same as for the "Before Compile/Run" trigger applies here too, only that the triggering event is when the user creates the final executable (F7).
After Create EXE : the tool is executed after the compilation to create the final executable is complete.
Source loaded : the tool is executed after a source code has been loaded into jaPBe.
Source saved : the tool will be executed after a source code in jaPBe has been saved successfully.

Verfasst: 06.03.2007 16:22
von #NULL
ich hab eine frage:
kann ich jaPBe beibringen, dass ich auch den block zwischen
StartDrawing(..) und StopDrawing(..) eingerückt haben möchte?
wenn der cursor hinter StopDrawing() steht (am ende der zeile),
und ich drücke return, dann schiebt er mir das StopDrawing() einen
tab nach rechts. das sieht dann so aus:

Code: Alles auswählen

StartDrawing( ScreenOutput() )
  dummy()
  StopDrawing()
  ..
:cry:

ich will deshalb nicht das ganze auto-indent abstellen.

Verfasst: 06.03.2007 17:22
von edel
Ja , du kannst es neu kompilieren :D

Das ganze sollte augelagert werden, auch die Schlüsselwörter (für eigene).
Vorzugsweise XML :allright:

Verfasst: 06.03.2007 17:30
von Green Snake
RTFM! :mrgreen:

Code: Alles auswählen


StartDrawing( ScreenOutput() ) ;>
  dummy() 
StopDrawing() ;<


Verfasst: 06.03.2007 18:02
von #NULL
danke.
ich wollte erstmal nur sichergehen, dass ich keine direkte einstellungsmöglichkeit übersehen hab.
das ;< wird mir in dem fall bestimmt reichen.
thnx für the tipp. 8)

Verfasst: 05.05.2007 13:54
von Kukulkan
Hallo,

Irgendwie kann ich die Funktion InitSprite3D() nicht mit jaPBE verwenden. Wenn ich den Code in jaPBE compilieren oder starten möchte kommt immer

Line xxx - InitSprite3D() is not a function, array, macro or linked list.

Wenn ich den selben Quellcode in der original PB-IDE öffne, dann klappt das problemlos. Kann das jemand bestätigen oder mach ich was falsch?

Beispielcode:

Code: Alles auswählen

If InitSprite() = 0 Or InitKeyboard() = 0 Or InitMouse() = 0 Or InitSound() = 0
  MessageRequester("Error", "Can't open DirectX 7 or later, mouse-, input- or sound-device", 0)
  End
EndIf

If InitSprite3D() = 0
  MessageRequester("Error", "Can't open DirectX 7 sprite-support or later (initsprite3d)", 0)
  End
EndIf
End
[EDIT] Hab noch die anderen Init's aus meinem Code in das Beispiel eingefügt. Ändert aber nix am verhalten da ich mit diesem Befehl in jaPBE weder starten (F5/F6) noch compilieren kann. In der Original IDE klappt es Problemlos.

Volker

Verfasst: 05.05.2007 14:19
von a14xerus
Bei mir klappt es, außer natürlich, das erstmal sprites initialisiert werden müssen, aber das ist ja beim compilieren nicht wichtig.
Also jaPBe meckert bei mir nicht

Verfasst: 07.05.2007 09:40
von dige
Volker: schau mal in Deinen Einstellungen welche Includes und Deklarationen
da aktiviert sind.
Möglicherweise wird die InitSprite3d() Funktion mit einer anderen
Prozedure "überladen"

Verfasst: 07.05.2007 11:02
von Kukulkan
Hi dige,
Volker: schau mal in Deinen Einstellungen welche Includes und Deklarationen
da aktiviert sind.
Möglicherweise wird die InitSprite3d() Funktion mit einer anderen
Prozedure "überladen"
Also in den Projekteinstellungen ist absolut kein Include angewählt. In den Einstellungen zu jaPBE ist ebenfalls kein Include gewählt. Die Definitions hier im Screenshot:

Bild

Ist da was falsch? Ich hab halt gewählt was mir für meine aktuellen Projekte für Wichtig erschienen ist. Aber auch wenn ich alles anwähle und dann jaPBE neu starte ist das Problem noch immer das selbe.

Volker