appllying changes to the new IDE

Esse commit está contido em:
Felipe N. Moura
2012-08-26 01:50:41 -03:00
commit d780d738d8
6 arquivos alterados com 150 adições e 8 exclusões
+24 -1
Ver Arquivo
@@ -1,2 +1,25 @@
<?php
header('location: ../docs/ide');
header('Content-type: text/html; charset=utf-8');
?><!DOCTAYPE HTML>
<html lang="en">
<head>
<title>Mind3rd IDE</title>
<link type='text/css' rel='stylesheet' href='styles/reset.css' />
<link type='text/css' rel='stylesheet' href='styles/default.css' />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined')
{
document.write(unescape("%3Cscript src='scripts/jquery/jquery.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script src='scripts/default.js'></script>
</head>
<body>
</body>
</html>
+1
Ver Arquivo
@@ -22,4 +22,5 @@
default :
$_REQ['data']= null;
}
include('mind3rd/API/utils/utils.php');
+108
Ver Arquivo
@@ -0,0 +1,108 @@
<?php
/**
* This file is part of TheWebMind 3rd generation.
*
* @author Felipe Nascimento de Moura <felipenmoura@gmail.com>
* @license licenses/mind3rd.license
*/
namespace API;
/**
* This is a facade to help you getting generic data.
* This class offers you a bunch of "shortcuts" to many different data or results.
*
* @author felipe
*/
class Get{
/**
* Gets a list of installed plugins.
*
* @param boolean $echoes If the plugins list should be sent to the output
* @return Array
*/
public static function plugins($echoes=false)
{
return \MindPlugin::listPlugins($echoes);
}
/**
* Gets an array with all the installed lobes.
* @return Array
*/
public static function lobes()
{
return \Lobe\Neuron::listLobes();
}
/**
* Gets all the information about the current project.
* @return string
*/
public static function projectData()
{
$dt= \Mind::$currentProject;
return $dt;
}
/**
* Returns a list of identified tables for the current project.
* @return Array
*/
public static function tables()
{
return \Analyst::getUniverse();
}
/**
* Returns an array with all the DDL codes for the current project.
* @return Array
*/
public static function DDL()
{
$dbDriver= \Mind::$currentProject['database_drive'];
\DQB\QueryFactory::setUp($dbDriver);
return \DQB\QueryFactory::getCompleteQuery(false, true, 'array');
}
/**
*
* Returns an array with all the DDL codes for the current project.
* This method returns each DDL comand as a decorated command, containing HTML tags.
* @return Array
*/
public static function DecoratedDDL()
{
$dbDriver= \Mind::$currentProject['database_drive'];
\DQB\QueryFactory::setUp($dbDriver);
return \DQB\QueryFactory::getCompleteQuery(true, false, 'array');
}
/**
* Gets the currently opened project or false if none.
*
* @return \MindProject|false
*/
public static function currentProject()
{
return \Mind::$project? \Mind::$project:
false;
}
/**
* Gets an array with all the source code, for the current project.
* @return Array
*/
public static function source()
{
return \API\Project::source();
}
/**
* Gets the list of currently instaled idioms.
* @return Array
*/
public static function idioms()
{
return \Mind::getIdiomsList();
}
}
+7 -1
Ver Arquivo
@@ -26,7 +26,7 @@
$_REQ['data'][$k]= preg_replace("/['\"\\\.\/]/", '', $value);
}
if(isset($_SESSION['currentProject']))
if(isset($_SESSION['currentProject']) && $_SESSION['currentProject'])
{
$p= Array();
$p['pk_project']= $_SESSION['currentProject'];
@@ -38,8 +38,14 @@
{
if(!isset($_REQ['data']) || !isset($_REQ['data']['program']))
{
if($_MIND->defaults['use_default_ide'] != false){
header('Location: '.$_MIND->defaults['use_default_ide']);
exit;
}else{
Mind::write('programRequired');
return false;
}
}
$program= $app->findCommand($_REQ['data']['program']);
$program= $program->getFileName();
+2
Ver Arquivo
@@ -47,6 +47,7 @@
$d->close();
}
// building the application
define('SYSTEM_NAME', 'mind');
$app= new Symfony\Component\Console\Application(SYSTEM_NAME);
@@ -66,6 +67,7 @@
$d->close();
$app->addCommands($programs);
\MIND::$programs= $programs;
// starting the application
if($_REQ['env']=='shell'){
include(_MINDSRC_.'/mind3rd/API/shell.php');
+2
Ver Arquivo
@@ -44,3 +44,5 @@ counter_col="counter"
; Varchar and Char properties should have mandatorily a size, if none is passed,
; the following value will be used as size
default_character_length=255
; should it open an IDE when HTTP requests come with no program param?
use_default_ide=ide/